More random python observations from a perl programmer

Skip Montanaro skip at mojam.com
Tue Sep 14 13:01:39 EDT 1999


    Hrvoje> I find `print' very convenient.  I would find it more convenient
    Hrvoje> if there were a way for it to print to stderr, though.

Well, there is, but you're probably not going to find it very convenient:

    stdout = sys.stdout
    sys.stdout = sys.stderr
    print "My mama told me, you better shop around..."
    sys.stdout = stdout

;-)

Skip Montanaro | http://www.mojam.com/
skip at mojam.com | http://www.musi-cal.com/~skip/
847-971-7098   | Python: Programming the way Guido indented...




More information about the Python-list mailing list