Message276506
| Author |
ncoghlan |
| Recipients |
ncoghlan |
| Date |
2016年09月15日.03:24:21 |
| SpamBayes Score |
-1.0 |
| Marked as misclassified |
Yes |
| Message-id |
<1473909864.28.0.88468333525.issue28140@psf.upfronthosting.co.za> |
| In-reply-to |
| Content |
Paul Moore pointed out on distutils-sig that since this is mainly desired for the REPL, we can put the logic in the default excepthook rather than into the SyntaxError constructor the way we had to for "print" and "exec":
def excepthook(typ, value, traceback):
if typ is SyntaxError and "pip install" in value.text:
print("'pip install' found in supplied text")
print("Try running this from a system command prompt")
return
sys.__excepthook__(typ, value, traceback) |
|
History
|
|---|
| Date |
User |
Action |
Args |
| 2016年09月15日 03:24:24 | ncoghlan | set | recipients:
+ ncoghlan |
| 2016年09月15日 03:24:24 | ncoghlan | set | messageid: <1473909864.28.0.88468333525.issue28140@psf.upfronthosting.co.za> |
| 2016年09月15日 03:24:24 | ncoghlan | link | issue28140 messages |
| 2016年09月15日 03:24:21 | ncoghlan | create |
|