Skip Montanaro wrote: > > Greg> Hmmm... does anyone else habitually write > > Greg> if __name__ == "__main__": > Greg> try: > Greg> main() > Greg> except KeyboardInterrupt: > Greg> sys.exit("interrupted") > > This suggests one other enhancement to me. Just as raising SystemExit > doesn't generate a traceback, perhaps the default handling of > KeyboardInterrupt could be configurable so I could set (for example): > > sys.gen_kbi_traceback = 0 > sys.gen_kbi_message = 0 > > to suppress traceback and/or message output without having to do > explicitly catch it. The default for both would be 1 to remain > compatible with current behavior. If you caught the exception, these > would have no effect. Isn't this already possible using one of the display hooks in sys, e.g. sys.excepthook() ?! -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Consulting & Company: http://www.egenix.com/ Python Software: http://www.lemburg.com/python/
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4