[issue11705] sys.excepthook doesn't work in imported modules

2015-03-08 Thread Claudiu Popa
Changes by Claudiu Popa : -- resolution: -> not a bug stage: -> resolved status: open -> closed ___ Python tracker ___ ___ Python-bu

[issue11705] sys.excepthook doesn't work in imported modules

2011-04-01 Thread STINNER Victor
STINNER Victor added the comment: python -c "import loggingTest" calls PyRun_SimpleStringFlags(). python import_loggingTest.py (import_loggingTest.py just contains "import loggingTest") calls PyRun_SimpleFileExFlags(). Both functions calls PyErr_Print() on error. An error occurs ("raise Exce

[issue11705] sys.excepthook doesn't work in imported modules

2011-04-01 Thread Éric Araujo
Changes by Éric Araujo : -- nosy: +Valery.Lesin, amaury.forgeotdarc, benjamin.peterson, haypo, pitrou ___ Python tracker ___ ___ Pytho

[issue11705] sys.excepthook doesn't work in imported modules

2011-03-28 Thread Andreas Stührk
Andreas Stührk added the comment: In my opinion, it is expected behaviour (but then, I'm not a core developer). -- ___ Python tracker ___ ___

[issue11705] sys.excepthook doesn't work in imported modules

2011-03-28 Thread Elias Zamaria
Elias Zamaria added the comment: Is my issue a bug or is it expected behavior? -- ___ Python tracker ___ ___ Python-bugs-list mailing

[issue11705] sys.excepthook doesn't work in imported modules

2011-03-28 Thread Andreas Stührk
Andreas Stührk added the comment: The difference between 2.7 and 2.7.1 is issue #10068 (e2aa3b1d08bc). -- ___ Python tracker ___ ___

[issue11705] sys.excepthook doesn't work in imported modules

2011-03-28 Thread Elias Zamaria
Elias Zamaria added the comment: Andreas, your explanation seems plausible. What has changed between 2.7 and 2.7.1 such that doing the same thing produces different results? -- ___ Python tracker

[issue11705] sys.excepthook doesn't work in imported modules

2011-03-28 Thread Andreas Stührk
Andreas Stührk added the comment: I really doubt that this issue has anything to do with `sys.excepthook` at all. It's rather that module members are set to `None` during module cleanup. Because the module raises an exception when one tries to import it, it will be cleaned up immediately (see

[issue11705] sys.excepthook doesn't work in imported modules

2011-03-28 Thread Elias Zamaria
New submission from Elias Zamaria : I am trying to design a Python program that logs all uncaught exceptions using the logging module. I am doing this by using the sys.excepthook function to override the default exception handling. I noticed that if I run the program directly from the command