Just as a side point, wouldn't the easiest way be to run the script
under sudo?
It's safer imho than putting the sudo password in programmatically...
Cheers
--Brett
On 30/05/2008, at 7:21 PM, Alan Gauld wrote:
"Ricardo Dueñas Parada" <[EMAIL PROTECTED]> wrote
When I run the command os.system in python, obviously he asks me
for the
password, and the program stops until I wirte it. . Is there any
way to
write the password from the python script?, or what do you
recommend me?
os.system is a very basic way of running a program.
You should use the newer subprocess module and the Popen() class.
There are examples in the documentation.
Also, basic usage is described in my Using the OS topic in my
tutorial.
--
Alan Gauld
Author of the Learn to Program web site
http://www.freenetpages.co.uk/hp/alan.gauld
_______________________________________________
Tutor maillist - [email protected]
http://mail.python.org/mailman/listinfo/tutor
_______________________________________________
Tutor maillist - [email protected]
http://mail.python.org/mailman/listinfo/tutor