Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #100152
| From | Dennis Lee Bieber <wlfraed@ix.netcom.com> |
|---|---|
| Newsgroups | comp.lang.python |
| Subject | Re: storing test logs under /var/log/ |
| Date | 2015-12-08 08:07 -0500 |
| Organization | IISS Elusive Unicorn |
| Message-ID | <mailman.62.1449580053.12405.python-list@python.org> (permalink) |
| References | <CACT3xuUafZ8Ga4WyLvRLHu0JYkp3cPBBeOUZo0sWazmcEGC-gw@mail.gmail.com> <20151203081723.GA48121@cskk.homeip.net> <CACT3xuVBeggf9scJMjgA1HT+P7AEp-x5GZBwGnzpq7_XQg7dUg@mail.gmail.com> |
On Tue, 8 Dec 2015 16:30:53 +0530, Ganesh Pal <ganesh1pal@gmail.com>
declaimed the following:
>> Finally. sys.exit accepts an integer, not a string.
>>
>
>Most of code uses sys.exit("some error message") , I did notice
>that the error message is not displayed by sys .exit("some error
>message") , do u mean that using string is not advisable with
>sys.exit ?
>How to I display error messages with sys.exit then ?
>
Literally? You don't... You return a status code to the environment,
and the environment that invoked your program is responsible for how to
display the status code. This may be nothing more than dumping a line like:
error: #
--
Wulfraed Dennis Lee Bieber AF6VN
wlfraed@ix.netcom.com HTTP://wlfraed.home.netcom.com/
Back to comp.lang.python | Previous | Next | Find similar | Unroll thread
Re: storing test logs under /var/log/ Dennis Lee Bieber <wlfraed@ix.netcom.com> - 2015-12-08 08:07 -0500
csiph-web