subprocess module: execution of standard binaries without shell?

Visco Shaun visco31 at gmail.com
Thu Feb 26 11:41:51 CET 2009


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

b) pipe = subprocess.Popen("/bin/ls /", stdout=subprocess.PIPE,
close_fds=True, shell=True)

-- 
Thanks & Regards
visco




More information about the Python-list mailing list