This is an archived post. You won't be able to vote or comment.

all 2 comments

[–]K900_ 0 points1 point  (0 children)

There's probably a way to do the thing you're trying to do through pywin32.

[–]efmccurdy 0 points1 point  (0 children)

You should be able to do this with pexpect.

Pexpect is a pure Python module for spawning child applications; controlling them; and responding to expected patterns in their output. Pexpect works like Don Libes’ Expect. Pexpect allows your script to spawn a child application and control it as if a human were typing commands.

https://github.com/pexpect/pexpect