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

doug doug_bartholomew99 at
Sat Aug 11 10:39:10 CEST 2001

Donn Cave <donn at> wrote in message news:<997511725.462302 at>...

> 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.


You are exactly right.  Thanks!

More information about the Python-list mailing list