[Python-Dev] Integrate the faulthandler module into Python 3.3?
Nick Coghlan
ncoghlan at gmail.com
Fri Mar 4 13:26:00 CET 2011
On Fri, Mar 4, 2011 at 9:32 PM, Scott Dial
<scott+python-dev at scottdial.com> wrote:
> I am still bothered by the fact that,
>
>>>> import faulthandler
>>>> faulthandler.enable()
>>>> import sys
>>>> sys.stderr.close()
>>>> sys.stderr = open('logs/error.log', 'wb')
>>>> faulthandler.sigsegv()
>
> , does the wrong thing. In this incantation, it's easy to say that it's
> programmer error, but I think this still precludes it from being on by
> default (where the first two statement are implicitly executed by the
> interpreter). It's probably uncommon enough to close stderr from an
> interactive interpreter session that it doesn't bother me (although I am
> not sure the utility of that), but I would hesitate to say that is true
> for using '-i'.
Perhaps the module should be using sys.__stderr__ instead? If anyone
is messing with that, on their own heads be it.
Cheers,
Nick.
--
Nick Coghlan | ncoghlan at gmail.com | Brisbane, Australia
More information about the Python-Dev
mailing list