3 ms·
Can you trap initial parse errors with sys.excepthook? I don't think you can, at least not in a single file script.
by tyingq 5y ago
Can you trap initial parse errors with sys.excepthook? I don't think you can, at least not in a single file script.
- BiteCode_dev 5y agoIt is not necessary, as I indicated before, if you isolate your entry point, you will not run into syntax errors (unless you publish broken code).
- tyingq 5y agoWell, where broken code is code that assumes /usr/bin/python would be python3.
- BiteCode_dev 5y agoAgain, not a problem if you isolate your entry point. Python will not parse the incompatible code since it's never imported. You keep repeating the same thing a if you ignored this essential part.
- tyingq 5y ago>You keep repeating the same thing a if you ignored this essential part. Well, yes, and you keep insisting that everything is fine, as-is. There was a missed opportunity here.