[pygtk] Getting password and running command-line with privileges

Juan Fiol fiolj at yahoo.com
Mon Feb 25 20:01:24 WST 2008


Hi,
I am implementing a gui and I need to implement it such that, in some
occasions, the user can run a command with privileges (via sudo). I
implemented a text entry with "no visible"  property to insert the
password and then I am running the command as:

os.system("cat password | command")

Is there a better (right way) to do it? Where may I find
hints/examples/discussion on how to implement this?

Thanks
        Juan



      ____________________________________________________________________________________
Be a better friend, newshound, and 
know-it-all with Yahoo! Mobile.  Try it now.  http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ 



More information about the pygtk mailing list