subprocess module: execution of standard binaries without shell?

V

Visco Shaun

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)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
474,260
Messages
2,571,038
Members
48,768
Latest member
first4landlord

Latest Threads

Top