Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #105820
| From | Terry Reedy <tjreedy@udel.edu> |
|---|---|
| Newsgroups | comp.lang.python |
| Subject | Re: help with program |
| Date | 2016-03-27 02:28 -0400 |
| Message-ID | <mailman.74.1459060111.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> |
On 3/26/2016 6:48 PM, Chris Angelico wrote:
> On Sun, Mar 27, 2016 at 7:38 AM, Jerry Martens
> <jmartens2@ameritech.net> wrote:
>> hi im trying to run this program and it opens a screen really ast
>> and closes it faster withou any results.
> There are a few ways you could do this. One is to run it from the
> command line. Another is to put this line at the end of the program:
>
> input("Press enter to exit. ")
For a tkinter program, use 'root.mainloop()' instead, where root is
usually an instance of tkinter.Tk.
> That should bring up the same screen (called a "console") and then
> have it wait until you're done reading it.
If at a terminal, 'python -i file.py' not only keeps the program open,
but brings up an interactive prompt so you can interact with the
program. This is useful for development.
> A third way is to edit your code using Idle, and run it from there.
IDLE emulates 'python -i file-in-editor.py'
> I haven't done that in a while, though, so the details might have
> changed in the recent versions.
Still F5 or the menu entry.
--
Terry Jan Reedy
Back to comp.lang.python | Previous | Next | Find similar | Unroll thread
Re: help with program Terry Reedy <tjreedy@udel.edu> - 2016-03-27 02:28 -0400
csiph-web