Python & Linux, some questions

Luca T. lucat at
Sun Mar 14 20:15:18 CET 2004

i need some answers...

1) I need to run some linux commands (from inside my app) that require 
superuser privileges (mkfs, losetup, etc), how do i do that? (I do not 
want to run my app with root privileges, but it will just ask the user 
for the root password before proceeding)
2) When i execute the command i need to read its output (especially the 
error messages) to know if everything went fine but i do not know how :(
3) How can i know if the user that is running my app is root or normal user?

Thank you,

More information about the Python-list mailing list