[python-win32] Expect-like behavior

Tim Roberts timr at probo.com
Sat Sep 15 00:55:46 CEST 2007


Roger Upole wrote:
> You may be able to use the win32console module, which wraps the native
> Windows console functions.  It allows you to simulate interactive command
> prompt input and read its output as pexpect does.
>   

I'm not convinced of that.  The console APIs let you read keystrokes and
write text and graphics to your OWN console window, but to the best of
my knowledge there is nothing in there to help you either monitor or
control another application.

The subprocess module is probably the right path for the original poster.

-- 
Tim Roberts, timr at probo.com
Providenza & Boekelheide, Inc.



More information about the python-win32 mailing list