On Thu, Nov 13, 2014 at 1:56 AM, Skip Montanaro <skip.montan...@gmail.com> wrote: > sys.excepthook = autoload_exc > > I can't see a lot of people wanting this (I normally have its import > commented out in my PYTHONSTARTUP file), and I think it would probably > be bad practice for new users of the language.
Interesting data point there - that you actually have it handy and choose not to use it. It's clearly designed for interactive mode, as it assumes that it can restart entire blocks of code: >>> for x in (1,2,3): ... print x ... if x==2: print os.pathsep ... 1 2 autoloading os 1 2 : 3 But that's about as good a "now go try this again" as will ever be achieved with sys.excepthook, I expect. ChrisA -- https://mail.python.org/mailman/listinfo/python-list