开发者

can winpexpect get the same result with subprocess?

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

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜