import sys
print (sys.platform)
print (2 ** 100)
input('press Enter to exit')
Suppose I wanted to use the number 1 as the button that must be pressed to exit. How would I go about doing this?
import sys
print (sys.platform)
print (2 ** 100)
input('press Enter to exit')
Suppose I wanted to use the number 1 as the button that must be pressed to exit. How would I go about doing this?
Something like this will do what you want:
while(raw_input('Press "1" to exit.') != '1'):
pass
Something like this?
http://mail.python.org/pipermail/python-list/1999-October/014262.html
Not so clean, but doable.
If you're building a command line app, why not use one of the libraries that help you build one.
For example: