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


Groups > comp.lang.python > #105820 > unrolled thread

Re: help with program

Started byTerry Reedy <tjreedy@udel.edu>
First post2016-03-27 02:28 -0400
Last post2016-03-27 02:28 -0400
Articles 1 — 1 participant

Back to article view | Back to comp.lang.python

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

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

#105820 — Re: help with program

FromTerry Reedy <tjreedy@udel.edu>
Date2016-03-27 02:28 -0400
SubjectRe: help with program
Message-ID<mailman.74.1459060111.28225.python-list@python.org>
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

[toc] | [standalone]


Back to top | Article view | comp.lang.python


csiph-web