[Python-Dev] py3k, bad sys.path and abort()

Christian Heimes lists at cheimes.de
Sun Jan 4 20:49:50 CET 2009


Mark Hammond schrieb:
> Would it be practical and desirable to handle this situation more
> gracefully, possibly just leaving sys.std* set to None and letting
> whatever exceptions then occur happen as normal without terminating the
> process?  Given it is an edge-case, I thought I'd open it here for
> discussion before putting work into a patch or opening a bug.

It's probably more helpful to keep the stderrprinter objects
(Object/fileobject.c) than setting stderr and stdout to None. At least
you can print something to stderr and stdout. On the other hand neither
GUI apps nor NT services have standard streams. You'll probably get it
right :)

Christian



More information about the Python-Dev mailing list