More output stuff.
This commit is contained in:
parent
ab61606bdb
commit
5f6ed7e05d
3 changed files with 4 additions and 6 deletions
6
dosage
6
dosage
|
@ -288,10 +288,8 @@ def doList(columnList=True, verbose=False):
|
|||
"""List available comics."""
|
||||
page = hasattr(sys.stdout, "isatty") and sys.stdout.isatty()
|
||||
if page:
|
||||
fd = StringIO()
|
||||
else:
|
||||
fd = sys.stdout
|
||||
out.setStream(fd)
|
||||
fd = StringIO(u'')
|
||||
out.setStream(fd)
|
||||
out.info(u'Available comic scrapers:')
|
||||
out.info(u'Comics tagged with [%s] require age confirmation with the --adult option.' % TAG_ADULT)
|
||||
out.info(u'Non-english comics are tagged with [%s].' % TAG_LANG)
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
# -*- coding: iso-8859-1 -*-
|
||||
# Copyright (C) 2000-2012 Bastian Kleineidam
|
||||
# Copyright (C) 2000-2013 Bastian Kleineidam
|
||||
"""
|
||||
ANSI Color definitions and functions. For Windows systems, the colorama module
|
||||
uses ctypes and Windows DLLs to generate colored output.
|
||||
|
|
|
@ -26,11 +26,11 @@ class Output(object):
|
|||
self.encoding = 'utf-8'
|
||||
else:
|
||||
self.encoding = encoding
|
||||
stream = codecs.getwriter(self.encoding)(stream)
|
||||
self.setStream(stream)
|
||||
|
||||
def setStream(self, stream):
|
||||
"""Initialize context and indentation."""
|
||||
stream = codecs.getwriter(self.encoding)(stream)
|
||||
self.stream = Colorizer(stream)
|
||||
|
||||
def info(self, s, level=0):
|
||||
|
|
Loading…
Reference in a new issue