[despammed] Re: redirect sys.stdout to C++ ?

Tatsujin tatsujin at despammed.com
Sat Dec 21 15:44:23 EST 2002


Donn Cave wrote:
> That isn't precisely the way to go.  The key point here is that unlike C++,
> Python doesn't care if stdout is subclass of the builtin file object type -
> doesn't make any difference at all.  So maybe it is indeed easier - you
> only need an object that supports the functions that stdout going to use.
> 
> If you have the Python source, cStringIO does that (much more than you
> need, though.)

Ah! So it's that easy?  (but then again, it's python we're talking here, no big 
surprise  :-)

Shouldn't be much trouble then, I suppose. Thanks a bunch!

/André






More information about the Python-list mailing list