Trying to run a sudo command from script

Aahz aahz at
Thu Jan 14 05:28:37 CET 2010

In article <mailman.330.1262427256.28905.python-list at>,
=?ISO-8859-1?Q?Paul_K=F6lle?=  <paul at> wrote:
>If you don't use shell=True you have to provide the full path to 
>commands (and split command and parameters as you do). 

Are you sure?  Try this:

print Popen(['ls'], stdin=PIPE, stdout=PIPE).communicate()[0]
Aahz (aahz at           <*>

"If you think it's expensive to hire a professional to do the job, wait
until you hire an amateur."  --Red Adair

More information about the Python-list mailing list