That you can try to write your code as usual for python using the normal input command. However, the trick is to add the input=raw_input command at the beginning of your program.
Now all you have to do is disable (or enable) depending on whether you are working in Python / IDLE or Terminal. You do this by simply adding "#" when necessary.
Disabled for use in Python / IDLE
And of course, it is included for use in the terminal.
input=raw_input
I'm not sure that it will always work, but it is a possible solution for simple programs or scripts.
joesh Jun 23 '13 at 16:21 2013-06-23 16:21
source share