Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #100152 > unrolled thread
| Started by | Dennis Lee Bieber <wlfraed@ix.netcom.com> |
|---|---|
| First post | 2015-12-08 08:07 -0500 |
| Last post | 2015-12-08 08:07 -0500 |
| Articles | 1 — 1 participant |
Back to article view | Back to comp.lang.python
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
Re: storing test logs under /var/log/ Dennis Lee Bieber <wlfraed@ix.netcom.com> - 2015-12-08 08:07 -0500
| From | Dennis Lee Bieber <wlfraed@ix.netcom.com> |
|---|---|
| Date | 2015-12-08 08:07 -0500 |
| Subject | Re: storing test logs under /var/log/ |
| Message-ID | <mailman.62.1449580053.12405.python-list@python.org> |
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 top | Article view | comp.lang.python
csiph-web