[EMAIL PROTECTED] wrote:
...
so, it seems to me that if I would know how to write a file object,
then I could write one that prefixes each line, and that would be
fine, no? I don't see how this would necessitate waiting for p.py's
termination, or matter that it is a different process. I just don't
know how to create a file object.
Duck typing to the rescue: Here's a simple file object for writing:
class MyFunkyOutput(object):
def write(self, sometext):
print repr(sometext)
def close(self):
pass
outputter = MyFunkyOutput()
print >>outputter, 1,'a', 43
--
http://mail.python.org/mailman/listinfo/python-list