[issue15033] Different exit status when using -m

2012-06-07 Thread Kamil Kisiel
New submission from Kamil Kisiel : Python returns a different exit status when an exception is raised and -m is used as opposed to just running a module. A short example, let's call it foo.py: def main(): raise ValueError() if __name__ == '__main__': m

[issue12423] signal handler doesn't handle SIGABRT from os.abort

2011-07-04 Thread Kamil Kisiel
Kamil Kisiel added the comment: Here's my proposed patch for the documentation, against the head of the 2.7 branch. -- keywords: +patch Added file: http://bugs.python.org/file22570/os.rst.patch ___ Python tracker <http://bugs.python.org/is

[issue12423] signal handler doesn't handle SIGABRT from os.abort

2011-06-28 Thread Kamil Kisiel
Kamil Kisiel added the comment: The application is interfacing with a C library that uses abort() to signal fatal errors (horrible, I know..). Instead of core dumping I would like to be able to handle these errors at the Python level and do something else. It's starting to sound like

[issue12423] signal handler doesn't handle SIGABRT from os.abort

2011-06-27 Thread Kamil Kisiel
New submission from Kamil Kisiel : It seems that registering a signal handler for SIGABRT doesn't handle the signal from os.abort(). Example code: import signal, os import time def handler(signum, frame): print "Signal!" raise Exception() signal.signal(signal.S

[issue12423] signal handler dpes

2011-06-27 Thread Kamil Kisiel
Changes by Kamil Kisiel : -- nosy: kisielk priority: normal severity: normal status: open title: signal handler dpes ___ Python tracker <http://bugs.python.org/issue12

[issue9933] os module does not have the documented EX_NOTFOUND attribute

2010-09-23 Thread Kamil Kisiel
Kamil Kisiel added the comment: I mostly wanted to just report the issue rather than propose a solution, so I'm in favor of whatever everyone feels is best. As for how I came across the issue, it was mostly curiosity, I wanted to see the numerical value of all the os.EX_* constants an

[issue9933] os module does not have the documented EX_NOTFOUND attribute

2010-09-23 Thread Kamil Kisiel
Kamil Kisiel added the comment: That should have read "Linux and OS X installs of *Python*". -- ___ Python tracker <http://bugs.python.org/issue9933> ___ __

[issue9933] os module does not have the documented EX_NOTFOUND attribute

2010-09-23 Thread Kamil Kisiel
New submission from Kamil Kisiel : The library documentation (http://docs.python.org/library/os.html) states: """ os.EX_NOTFOUND Exit code that means something like “an entry was not found”. Availability: Unix. New in version 2.3. """ However, on both my Linux

[issue7951] Should str.format allow negative indexes when used for __getitem__ access?

2010-06-23 Thread Kamil Kisiel
Kamil Kisiel added the comment: While I agree this functionality isn't strictly necessary I think it makes sense from a semantic point of view. I ran in to this issue today while writing some code and I simply expected the negative syntax to work, given that the format string s