Changing interpreter's deafult output/error streams

Michael Hudson mwh at python.net
Sun Jul 31 14:45:40 EDT 2005


"Ira" <sheig222 at gmail.com> writes:

> Using an embedded interpreter, how do I change it's default output
> streams (specifically the one used by PyErr_Print() which I'm
> guessing is the default error stream)?

It looks as though it writes to stderr unconditionally.  But most of
the reasons for ended up in PyErr_Print can be intercepted at a higher
level (I think -- I mean sys.excepthook & co here).

Cheers,
mwh

-- 
  ARTHUR:  Yes.  It was on display in the bottom of a locked filing
           cabinet stuck in a disused lavatory with a sign on the door
           saying "Beware of the Leopard".
                    -- The Hitch-Hikers Guide to the Galaxy, Episode 1



More information about the Python-list mailing list