help with program
Terry Reedy
tjreedy at udel.edu
Sun Mar 27 02:28:15 EDT 2016
On 3/26/2016 6:48 PM, Chris Angelico wrote:
> On Sun, Mar 27, 2016 at 7:38 AM, Jerry Martens
> <jmartens2 at 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
More information about the Python-list
mailing list