I want to communicate with the subprocess on Windows, and I find winpexpect is one way can help to comp开发者_StackOverflow社区lete the task. The codes is as following
>>> import winpexpect
>>> subproc=winpexpect.winspawn('python')
>>> subproc.expect('>>>')
and a TimeOut exception is raised. Can someone give me some advices?
>>>import subprocess
>>>subproc=subprocess.Popen('python')
codes using subprocess can really start python program, however winpexpect doesn't seem to start
精彩评论