command string good in subprocess.Popen(string) fails in process.Process(string)
Earl Eiland
eee at nmt.edu
Mon May 16 09:52:54 EDT 2005
from Trent Mick trentm at ActiveState.com:
"You might be able to use or borrow code from my process.py module.
process.py is very similar to Python 2.4's subprocess. It provides a
ProcessOpen class (similar to subprocess' Popen). A ProcessOpen instance
has wait() and kill() methods that work fine on Windows. Under the hood
they are using the Win32 API WaitForSingleObject() and
TerminateProcess() functions."
http://starship.python.net/~tmick/"
On Mon, 2005-05-16 at 07:27, Peter Hansen wrote:
> Earl Eiland wrote:
> > The command string consists of "filename.exe instruction1 instruction2
> > ..." It works in subprocess, but in process, returns the error "can't
> > find the file instruction1".
> >
> > How do I pass command line instructions in process.Process? I tried a
> > list ['filename.exe', 'instruction1 instruction2 ...'] with the same
> > result.
>
> Where are you getting this "process" module from? It's not standard:
>
> c:\>python
> Python 2.4 (#60, Nov 30 2004, 11:49:19) [MSC v.1310 32 bit (Intel)] on win32
> >>> import process
> Traceback (most recent call last):
> File "<stdin>", line 1, in ?
> ImportError: No module named process
>
>
> -Peter
More information about the Python-list
mailing list