running commands with sudo & python

John Bauman john at
Fri Sep 29 05:57:43 CEST 2006

coldsoul4e at wrote:
> Hi!
> I must execute a command with os.command(), but with root permissions.
> Is there anyway to do that with python? 
> Thanks
Of course, it's not generally a good idea to have your program keep root 
permissions after it does whatever it needs to do.

More information about the Python-list mailing list