Home > other >  How python in a terminal window input and reads the return value?
How python in a terminal window input and reads the return value?

Time:09-20

Write an automated script, to open a terminal window, but I need the script in the terminal window open input string and obtain the return values of the terminal can you tell me how to achieve? The environment is Python2.6

CodePudding user response:

If OS. Popen?

CodePudding user response:

reference 1/f, old coconut response:
is OS. The popen?
hello, tried it on, you can open, but the return is a file object, is there any way you can see the program runs? Like startfile, but startfile cannot read the return value to input program operation,,,

CodePudding user response:

You finally solved? How to after open exe, continue to input string inside,

CodePudding user response:

Don't input? Name=input (" please enter your name)"

CodePudding user response:

Raw_input ()?/? The use of the python2
  • Related