Visco Shaun schrieb: > hi all > > while getting used to with subprocess module i failed in executuing a) > but succeeded in running b). Can anyone explain me why as i am providing > absolute path? Is this has to do anything with shared library.. which > must be accessed based on system variables? > > > a) pipe = subprocess.Popen("/bin/ls /", stdout=subprocess.PIPE, > close_fds=True) > ==>OSError: [Errno 2] No such file or directory
You have to use a list instead of a string here. pipe = subprocess.Popen(["/bin/ls", "/"], stdout=subprocess.PIPE) -- http://mail.python.org/mailman/listinfo/python-list