Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #105853

Re: help with program

From Terry Reedy <tjreedy@udel.edu>
Newsgroups comp.lang.python
Subject Re: help with program
Date 2016-03-27 11:47 -0400
Message-ID <mailman.88.1459093676.28225.python-list@python.org> (permalink)
References <1392737302.749065.1459024715818.JavaMail.yahoo.ref@mail.yahoo.com> <1392737302.749065.1459024715818.JavaMail.yahoo@mail.yahoo.com> <CAPTjJmoLW4ye7RotcjCYtBeGapObWSsJBLMVkaoqshYj+Xw+iA@mail.gmail.com> <nd7ui2$q46$1@ger.gmane.org> <CAP1rxO6JBo+mnzyozJsBMqYTeuS-jHGwkiT5QqjuSs2kH2PdfQ@mail.gmail.com>

Show all headers | View raw


On 3/27/2016 10:18 AM, Bob Gailer wrote:
> The problem with putting input at the end of a program is: if the program
> raises an exception you won't see it.

What you are saying is that putting input() at the end of a program (or 
before any exit point) is insufficient for keeping a window alive if the 
program has a bug that causes an exception.  If that is considered 
possible, wrap the entire code in try-except and print or log the 
exception before using input to keep the window alive.  During 
development, it is easier to just run the program in a persistent 
environment, whether console or IDE such as IDLE.

-- 
Terry Jan Reedy

Back to comp.lang.python | Previous | Next | Find similar | Unroll thread


Thread

Re: help with program Terry Reedy <tjreedy@udel.edu> - 2016-03-27 11:47 -0400

csiph-web