I'm new to Python programming and in the process of learning the sub process
I went through the python documentation
http://docs.python.org/library/subprocess.html and I have the following
1. The class definition as per the documentation is:
*class *subprocess.Popen(*args*, *bufsize=0*, *executable=None*, *stdin=None
*, *stdout=None*, *stderr=None*, *preexec_fn=None*, *close_fds=False*, *
shell=False*, *cwd=None*, *env=None*, *universal_newlines=False*, *
*args* should be a string, or a sequence of program arguments.
so I assume that args can be a string or a list with first item of the list
being the program to execute.
so on the python IDLE, I executed this command,
<subprocess.Popen object at 0x00F5AA50> which opened up a command prompt.
when I give this as a list, as below it throwed this error.
Traceback (most recent call last):
File "<pyshell#29>", line 1, in <module>
File "C:\Python26\lib\subprocess.py", line 623, in __init__
File "C:\Python26\lib\subprocess.py", line 833, in _execute_child
WindowsError: [Error 2] The system cannot find the file specified
I would assume that a list is accepted as part of the args and first being
the program (cmd.exe) and the rest being the arguments... please correct me
If i misunderstood.
-------------- next part --------------
An HTML attachment was scrubbed...