Path: csiph.com!fu-berlin.de!uni-berlin.de!not-for-mail From: Dennis Lee Bieber Newsgroups: comp.lang.python Subject: Re: storing test logs under /var/log/ Date: Tue, 08 Dec 2015 08:07:21 -0500 Organization: IISS Elusive Unicorn Lines: 23 Message-ID: References: <20151203081723.GA48121@cskk.homeip.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Trace: news.uni-berlin.de pQO/12MKoGIeemfPDYNWjgbS4xl4E+9WQcsicCbWe8RQ== Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.001 X-Spam-Evidence: '*H*': 1.00; '*S*': 0.00; 'string.': 0.04; 'error:': 0.05; 'sys': 0.05; 'subject:test': 0.07; 'integer,': 0.09; 'message-id:@4ax.com': 0.09; 'received:80.91': 0.09; 'received:80.91.229': 0.09; 'received:gmane.org': 0.09; 'received:list': 0.09; '>that': 0.16; 'received:80.91.229.3': 0.16; 'received:io': 0.16; 'received:plane.gmane.org': 0.16; 'received:psf.io': 0.16; 'subject:log': 0.16; 'subject:under': 0.16; 'string': 0.17; 'url:home': 0.18; '2015': 0.20; 'code.': 0.23; 'dec': 0.23; 'header:X-Complaints-To:1': 0.26; 'error': 0.27; 'accepts': 0.29; 'environment': 0.29; 'subject:/': 0.30; 'code': 0.30; 'displayed': 0.33; 'environment,': 0.33; 'tue,': 0.34; 'to:addr:python-list': 0.36; 'subject:: ': 0.37; 'responsible': 0.37; 'display': 0.37; 'received:org': 0.37; 'charset:us-ascii': 0.37; 'mean': 0.38; 'to:addr:python.org': 0.40; 'your': 0.60; 'more': 0.63; '>how': 0.84; "don't...": 0.84; 'message")': 0.84; 'dennis': 0.91; 'received:108': 0.93 X-Injected-Via-Gmane: http://gmane.org/ X-Gmane-NNTP-Posting-Host: adsl-108-73-119-149.dsl.klmzmi.sbcglobal.net X-Newsreader: Forte Agent 6.00/32.1186 X-No-Archive: YES X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.20+ Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Xref: csiph.com comp.lang.python:100152 On Tue, 8 Dec 2015 16:30:53 +0530, Ganesh Pal 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/