1

I tried time.sleep(secs). However this has to sleep for some specific seconds. It is not totally paused. Does Python have any function to pause the script forever if there is no any input ? Thanks !

2
  • 5
    define 'input': a signal, keystroke, network I/O, what? Commented Mar 7, 2014 at 22:56
  • @isedev does Python have any specific existing function ? Commented Mar 7, 2014 at 22:57

2 Answers 2

3

If you just want to pause until keyboard entry try:

raw_input("press enter")
Sign up to request clarification or add additional context in comments.

Comments

2

sys.stdin.readline() blocks until you enter input.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.