how can I run python interactively?

Graham graham.abbott at gmail.com
Thu Nov 3 01:51:16 EST 2005


You could use either:

    s = raw_input("Please Hit a Key...")

s being the string they typed before hitting enter.

or  you could use

   print "Please hit a key..."
   s = sys.stdin.readline()

the only reason i recommend the second is because i believe i saw in a
PEP that raw_input was being depreciated at some point, however i may
be wrong on that. (correction anyone?)




More information about the Python-list mailing list