redirect python output + extension type with own print method = FAILS

doug doug_bartholomew99 at yahoo.com
Sat Aug 11 04:39:10 EDT 2001


Donn Cave <donn at drizzle.com> wrote in message news:<997511725.462302 at yabetcha.sttl.drizzle.com>...

> BOTTOMLINE ANSWER:  If you want to say "print xxx" and have the
> output go through your stdout - you don't really want a "print"
> method, you want a "repr" method.  No I/O, just return a string
> (as in PyString_FromString().)  The "print" statement does all the I/O.

Donn,

You are exactly right.  Thanks!



More information about the Python-list mailing list