The code should have extra colons. >>> class ThreadedOut: ... def __init__( self, old ): ... self._old= old ... def write( self, s ): ... self._old.write( ':' ) ... return self._old.write( s ) ... def flush( self ): ... self._old.flush() ... >>> import sys >>> thout= ThreadedOut( sys.stdout ) >>> olds= sys.stdout, sys.stderr, sys.__stderr__, sys.__stdout__ >>> sys.stdout= sys.stderr= sys.__stderr__= sys.__stdout__= thout >>> 0 :0: >>> >>> 123 :123: >>> >>>
Specifically, before the prompts. Where does the prompt write come from; why doesn't it honor my settings of sys.stdout and sys.stderr? -- http://mail.python.org/mailman/listinfo/python-list