On Jul 26, 7:08 am, D'Arcy J.M. Cain [EMAIL PROTECTED] wrote:
On Sat, 26 Jul 2008 14:07:52 +1000
Ben Finney [EMAIL PROTECTED] wrote:
sys.stdout = n
Re-binds the name 'sys.stdout' to the object already referenced by the
name 'n'. No objects are changed by this; only bindings of names
On Sat, 26 Jul 2008 14:07:52 +1000
Ben Finney [EMAIL PROTECTED] wrote:
sys.stdout = n
Re-binds the name 'sys.stdout' to the object already referenced by the
name 'n'. No objects are changed by this; only bindings of names to
objects.
I do agree that the object formerly known as
bukzor [EMAIL PROTECTED] writes:
I was trying to change the behaviour of print (tee all output to a
temp file) by inheriting from file and overwriting sys.stdout
That's not what your code does, though.
def main():
n = notafile('/dev/stdout', w)
Creates a new instance of the 'notafile'