From 6ee536b3098ab12dc8548ffe06d61fbb501b05f0 Mon Sep 17 00:00:00 2001 From: Kenneth Reitz Date: Fri, 18 Mar 2011 22:41:01 -0400 Subject: [PATCH] puts knows state now! --- clint/textui/core.py | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/clint/textui/core.py b/clint/textui/core.py index a0aab9c..5b559b5 100644 --- a/clint/textui/core.py +++ b/clint/textui/core.py @@ -13,12 +13,11 @@ STDOUT = sys.stdout.write STDERR = sys.stderr.write class Puts(object): - class Borg(object): - """All instances of Borg have the same value.""" - + """All-knowing puts""" + shared = dict(indent_level=0, indent_str='') - def __init__(self, indent=0, quote=' ', indent_char=' '): + def __init__(self, indent=0, quote='', indent_char=' '): # self.shared = Borg() self.indent = indent self.indent_char = indent_char @@ -58,7 +57,7 @@ def _out(stream, s, newline): def puts(s, newline=True): """Prints given string to stdout.""" - _out(STDOUT, s, newline) + Puts()(s) def puts_err(s, newline=True):