Keeping the console window

K

K Viltersten

I've proudly connected Notepad++ to edit
and run my fantastic software. When that
started to work, i noticed that all the
printing disappears as the console window
vanishes upon the program completion.

How can i trick Python program to keep on
running even if the actual statements
have been exectuted?

Some kind of reading from keyboard?
 
S

Sam

You may use python in interactive mode:

$ python -i yourScript.py

Or use a blocking readline:

$ cat yourScript.py
import sys
sys.stdin.readline()

++

Sam
 
C

castironpi

You may use python in interactive mode:

$ python -i yourScript.py

Or use a blocking readline:

$ cat yourScript.py
import sys
sys.stdin.readline()

++

Sam

FWIW, for what it's worth, you can invoke the interpreter from a batch
file/shell script too, and just use the native PAUSE instruction to
prompt for 'any key to continue'.
 
K

K Viltersten

You may use python in interactive mode:
$ python -i yourScript.py

Or use a blocking readline:

$ cat yourScript.py
import sys
sys.stdin.readline()


Thanks guys!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,743
Messages
2,569,478
Members
44,899
Latest member
RodneyMcAu

Latest Threads

Top