Le lundi 08 mars 2010 22:18:34, Glyph Lefkowitz a écrit : > On Mar 8, 2010, at 4:06 PM, Guido van Rossum wrote: > > I am trying to remember why I made site.py failures non-fatal in the > > first place. I don't have any specific recollection but it must've > > been either from before the separation between site.py (part of the > > stdlib) and sitecustomize.py (site-specific) or out of a worry that if > > some external cause broke site.py (which does a lot of I/O) it would > > be a fatal breakdown of all Python execution. > > The thing that occurs to me is that one might want to write an > administrative tool in Python to manipulate site.py, or even just some > data that something in site.py would load. If exceptions from site.py > were fatal, then bugs in such a tool would be completely unrecoverable; in > trying to run it to un-do the buggy operation, it would crash immediately.
I don't think that modifying the site.py file is a good idea. Why not editing/generating the sitecustomize or usercustomize module? Anyway, if you write such tool: use a different language or use a failsafe Python interpreter dedicated to this tool ;-) -- Victor Stinner http://www.haypocalc.com/ _______________________________________________ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com