Jeff Epler wrote:
This issue was discussed in another recent python-list thread, called "Writing to stdout and a log file".
My second post includes a patch to Python's "fileobject.c" that made the code that started that thread work, but for reasons I mentioned in that post I didn't want to push for inclusion of my patch. I didn't check, but it will probably allow your code to work too.
If you feel differently, then the thing to do is probably to submit the patch plus a test case to the sf.net patch tracker for python (sf.net/projects/python, click on "patches". you'll need a sourceforge account to submit the patch)
Jeff PS I did allow the Python test suite to run to completion after I wrote that message. It didn't produce any failures or unexpected skips on my platform.
Thanks. I never got involved in Python development before, so I will take a look at the development process. I took a quick look at the affected C files and must confess that I need more time looking at them to learn everything around it. However, I think that the behaviour of file handling should change so that any class derived from file should support the >> operator 'properly' (ie the derived class write() method should be called).
Pierre -- http://mail.python.org/mailman/listinfo/python-list