Path: csiph.com!usenet.pasdenom.info!news.albasani.net!newsfeed.freenet.ag!news2.euro.net!newsfeed.xs4all.nl!newsfeed4.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.009 X-Spam-Evidence: '*H*': 0.98; '*S*': 0.00; 'subject:Python': 0.05; 'python': 0.09; 'command-line': 0.09; 'fetch': 0.09; 'integers': 0.09; 'it;': 0.09; 'cases': 0.15; 'dec': 0.15; '24,': 0.16; 'from:addr:torriem': 0.16; 'from:name:michael torrie': 0.16; 'wrote:': 0.17; 'odd': 0.17; '(or': 0.18; 'windows': 0.19; 'feb': 0.19; 'error.': 0.21; 'terminate': 0.22; 'apps': 0.23; 'errors': 0.23; 'header:In-Reply-To:1': 0.25; 'header:User-Agent:1': 0.26; 'skip:" 20': 0.26; 'am,': 0.27; 'ibm': 0.27; 'chris': 0.28; 'error': 0.30; 'code': 0.31; 'could': 0.32; 'raising': 0.33; 'to:addr:python-list': 0.33; "can't": 0.34; 'wrong': 0.34; 'pm,': 0.35; 'received:org': 0.36; 'but': 0.36; 'message-id:@gmail.com': 0.36; 'too': 0.36; 'operating': 0.36; 'subject:: ': 0.38; 'positive': 0.38; 'some': 0.38; 'to:addr:python.org': 0.39; 'received:192': 0.39; 'skip:" 10': 0.40; 'received:192.168': 0.40; 'header:Received:5': 0.40; 'think': 0.40; 'success,': 0.62; 'skip:n 10': 0.63; 'more': 0.63; 'sounds': 0.71; '100': 0.78; '2013': 0.84; 'dennis': 0.91 X-Virus-Scanned: amavisd-new at torriefamily.org Date: Sat, 23 Feb 2013 15:52:31 -0700 From: Michael Torrie User-Agent: Mozilla/5.0 (X11; Linux i686; rv:10.0.12) Gecko/20130105 Thunderbird/10.0.12 MIME-Version: 1.0 To: python-list@python.org Subject: Re: Python Newbie References: <5127848B.1060004@gmail.com> <928d2cf7-728b-4f35-b8c9-4c9b958507e5@googlegroups.com> <8eadd52c-d533-4333-8c7f-7bf3a6d7b046@googlegroups.com> <9p1ii899tkalvfd1cl7sneoqa9t1cqh4oj@invalid.netcom.com> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.python Message-ID: Lines: 20 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1361659960 news.xs4all.nl 6933 [2001:888:2000:d::a6]:37177 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:39719 On 02/23/2013 02:38 PM, Chris Angelico wrote: > On Sun, Feb 24, 2013 at 5:29 AM, Dennis Lee Bieber > wrote: >> Error codes under DEC VAX/VMS used odd integers for >> "success/information" and even integers for "warning/error" (been too >> many years, I think positive integers were success/warning, negative >> integers were information/error; I could also be wrong on which set were >> even... if 0 were no-info/success then odd were errors and even were >> success)). > > Sounds like IBM DB2 and sqlca.sqlcode - 0 for success, <0 for error, >> 0 for warning (or in some cases "status" - an SQLCODE of 100 means > "end of result set", which isn't exactly an error but you can't fetch > any more from it; it's akin to Python raising StopIteration to > terminate a for loop). All apps that return an error code to the operating system return 0 for success, any other value for error. All command-line utilities work this way, all shells, etc. Even Windows command-line apps work this way (errorlevel is what they call it).