Re: exit status
Greg Ward <[email protected]> Mon, 16 Jun 2003 18:38:50 -0400
| Newsgroups | gmane.comp.python.optik.user |
|---|---|
| Message-ID | <[email protected]> |
On 14 June 2003, David Goodger said:
> The reason I said "not significant" was that the "error" method already
> prints usage info (to sys.stdout), whether or not the SystemExit is
> caught. A line more isn't significant. If my app wanted to catch
> SystemExit without output, I'd have to redirect sys.stdout in order to
> block the usage info as well; very kludgey.
Oh crap, you're right. OK, I'm back to my old stance: change it to
exit(2) if you want, I don't care either way.
Hmmmm: shouldn't the usage go to stderr if it results from an error?
(Ie. if you *ask* for help, that's not an error, so print everything to
stdout and exit(0); but if you screw up, print the usage to stderr and
exit(!0).)
Greg
--
Greg Ward <[email protected]> http://www.gerg.ca/
Are we THERE yet?
-------------------------------------------------------
This SF.Net email is sponsored by: INetU
Attention Web Developers & Consultants: Become An INetU Hosting Partner.
Refer Dedicated Servers. We Manage Them. You Get 10% Monthly Commission!
INetU Dedicated Managed Hosting http://www.inetu.net/partner/index.php