Subprocess module question.

aditya shukla adityashukla1983 at gmail.com
Tue Aug 19 21:06:13 EDT 2008


Hello folks,

I am using windows vista and i am trying to communicate with various
processes.
so when i do

import subprocess
proc=subprocess.Popen('cmd.exe')
--This opens the command prompt
But when i do

proc=subprocess.Popen('netscan.exe')
it gives an error

Traceback (most recent call last):
  File "<pyshell#11>", line 1, in <module>
    proc =subprocess.Popen('netscan.exe')
  File "C:\Python25\lib\subprocess.py", line 594, in __init__
    errread, errwrite)
  File "C:\Python25\lib\subprocess.py", line 816, in _execute_child
    startupinfo)
WindowsError: [Error 2] The system cannot find the file specified

However "netscan.exe" is present on my system.

Some please explain why does this happens?

Thanks in advance

Aditya
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20080819/8db80c29/attachment.html>


More information about the Python-list mailing list