On Mar 8, 7:49 pm, James Mills <prolo...@shortcircuit.net.au> wrote: > On Wed, Mar 9, 2011 at 9:20 AM, Danny Shevitz <shev...@lanl.gov> wrote: > > Is there any way to attach to an already running process by pid? I want to > > send > > commands from python to an application that is already running. I don't > > want to > > give the command name to subprocess.Popen. > > Unless I'm missing something here I don't see how you could > achieve communication with another process unless that > process has some kind of communication(s) interface; eg: > * some kind of listening socket > * some kind of I/O (pipe, stdin/stdout) > > cheers > James > > -- > -- James Mills > -- > -- "Problems are solved by method"
Have a look at the SIMPL toolkit. http://www.icanprogram.com/06py/lesson1/lesson1.html This should be able to do exactly what you want. bob -- http://mail.python.org/mailman/listinfo/python-list