Python Subprocess module

2007-07-13 Thread Dave Sampson
hey folks, A simple question hopefully. despite all my searching I have not found a satisfactory response. The goal. Interact with a command line program. Simple enough, but the key is INTERACT. I tried the shell and comand approaches but that initiates, it does not allow interaction with the

Re: Python Subprocess module

2007-07-21 Thread Dave Sampson
On Jul 13, 7:50 pm, Dan Stromberg - Datallegro <[EMAIL PROTECTED]> wrote: > You could start up a pty and do your own Pexpect-like thing, using > read/readline/write. > > However, this may not be portable to windows. Maybe if you get the python > that comes with cygwin, or build your own python und

Re: Python Subprocess module

2007-07-21 Thread Dave Sampson
send keys for the p.c. you can use a try: except: concept and on the > windows platform there is also a way to use autoit in python using > pywin. thanks for the uggestion about sendkeys. I might be able to build that into the wrapper. So you're sugesting: NIX = Pexpect WINDOZE = sendkeys Cor

Re: Python Subprocess module

2007-07-21 Thread Dave Sampson
Thanks for your response. It;s good to see you're promtoing Pexpect. I was actualy wokring on a project at work that could have used Pexpect to automate the creation of maps by tieing togethr a bunch of processes through SSH and Pexpect looked like the money shot. however it was enough of a battle

Re: Python Subprocess module

2007-07-21 Thread Dave Sampson
> You probably > mean:http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/440554 > > Why is that not sufficient? It will allow interaction with a called > subprocess, in a cross-platform manner, etc. > > - Josiah Sorry maybe 'not sufficient' was the wrong excuse. Maybe the right thing to