[issue36691] SystemExit & sys.exit : Allow both exit status and message

2019-05-28 Thread Jeffrey Kintscher
Change by Jeffrey Kintscher : -- nosy: +Jeffrey.Kintscher ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: htt

[issue36691] SystemExit & sys.exit : Allow both exit status and message

2019-05-19 Thread Matthias Bussonnier
Change by Matthias Bussonnier : -- nosy: +mbussonn ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://ma

[issue36691] SystemExit & sys.exit : Allow both exit status and message

2019-05-18 Thread Eric V. Smith
Eric V. Smith added the comment: You could add a flag in the exception to tell the default handler where to write the message. It would default to stderr. This would make it possible to catch the exception before it was written out, and customize the behavior. -- nosy: +eric.smith

[issue36691] SystemExit & sys.exit : Allow both exit status and message

2019-04-21 Thread Barry A. Warsaw
Change by Barry A. Warsaw : -- nosy: +barry ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.pyth

[issue36691] SystemExit & sys.exit : Allow both exit status and message

2019-04-21 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: The default handler writes the message of non-integer code to stderr, but in case of '--help', the message should be written to stdout. So this feature is not applicable for it. Are there other examples where this feature can be used? In such cases it is b

[issue36691] SystemExit & sys.exit : Allow both exit status and message

2019-04-21 Thread Thomas Kluyver
New submission from Thomas Kluyver : The SystemExit exception, and consequently the sys.exit() function, take a single parameter which is either an integer exit status for the process, or a message to print to stderr before exiting - in which case the exit status is implicitly 1. In certain