Threads with independant IO streams

Tim Peters tim.one at comcast.net
Thu Mar 13 15:21:06 EST 2003


[Tim]
> The print statement passes the object to be printed to sys.displayhook()
> for display.  You could try supplying your own displayhook function.

[Alex Martelli]
> The print statement does not use sys.displayhook in any Python version
> I've seen -- sys.displayhook is used by the interactive interpreter to
> display the values returned by expression-statements.  So, is somebody
> spoofing the timbot, or am I in a dangerously low blood-sugar condition?
> I'd better go to dinner right now, just in case...

You're absolutely right (about dinner, too):  the bot was staring at
ceval.c, and stopped at the PRINT_EXPR opcode instead of the PRINT_ITEM
opcode.  The OP could indeed *try* supplying his own displayhook function,
but it wouldn't do a lick of good.  I think I detect bot laughter in the
background.






More information about the Python-list mailing list