More output stuff.

This commit is contained in:
Bastian Kleineidam 2013-04-30 07:24:54 +02:00
parent ab61606bdb
commit 5f6ed7e05d
3 changed files with 4 additions and 6 deletions

4
dosage
View file

@ -288,9 +288,7 @@ 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
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)

View file

@ -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.

View file

@ -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):