This issue tracker has been migrated to GitHub ,
and is currently read-only.
For more information,
see the GitHub FAQs in the Python's Developer Guide.
| Author | gjb1002 |
|---|---|
| Recipients | gjb1002 |
| Date | 2008年06月19日.08:04:34 |
| SpamBayes Score | 0.0016620269 |
| Marked as misclassified | No |
| Message-id | <1213862677.34.0.00995012597112.issue3137@psf.upfronthosting.co.za> |
| In-reply-to |
| Content | |
|---|---|
If a python script receives SIGINT while the interpreter is starting up, it's possible to get the message "import site failed; use -v for traceback" printed on standard error and for execution to proceed. It also seems to be possible to get half-imported modules and for the script to fail later claiming that something like "os.getenv" doesn't exist. If I do as instructed and use -v for traceback I get something like: 'import site' failed; traceback: Traceback (most recent call last): File "/usr/lib/python2.4/site.py", line 61, in ? import os File "/usr/lib/python2.4/os.py", line 683, in ? import copy_reg as _copy_reg File "/usr/lib/python2.4/copy_reg.py", line 5, in ? """ KeyboardInterrupt I imagine there exists some code like try: import site except: sys.stderr.write("import site failed; use -v for traceback\n") though I couldn't find any. If so, it seems clear that KeyboardInterrupt needs to be re-raised, or Python's special handler for SIGINT installed rather later. |
|
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2008年06月19日 08:04:37 | gjb1002 | set | spambayes_score: 0.00166203 -> 0.0016620269 recipients: + gjb1002 |
| 2008年06月19日 08:04:37 | gjb1002 | set | spambayes_score: 0.00166203 -> 0.00166203 messageid: <1213862677.34.0.00995012597112.issue3137@psf.upfronthosting.co.za> |
| 2008年06月19日 08:04:36 | gjb1002 | link | issue3137 messages |
| 2008年06月19日 08:04:35 | gjb1002 | create | |