I
iu2
Hi,
I'm trying to write data to both a file and the console, so I did:
class File_and_console(file):
def write(self, s):
file.write(self, s)
print s,
the 'write' method works, but 'print >>' doesn't, it writes only to
the file. It doesn't actually call File_and_console.write
Why? How can I fix it?
Thanks
iu2
I'm trying to write data to both a file and the console, so I did:
class File_and_console(file):
def write(self, s):
file.write(self, s)
print s,
the 'write' method works, but 'print >>' doesn't, it writes only to
the file. It doesn't actually call File_and_console.write
Why? How can I fix it?
Thanks
iu2