Python: module rox.su

rox.su | index

`The su (switch user) module allows you to execute commands as root.
Typical usage:
def fn():
proxy_maker = SuProxyMaker('I need root access to change /etc/fstab')
yield proxy_maker.blocker
root = proxy_maker.get_root()
call = root.open('/etc/fstab')
yield call
fd = call.result
...
root.finish()
tasks.run(fn())`

Classes
`` |  | rox.tasks.Blocker SuProxyMaker
class SuProxyMaker(rox.tasks.Blocker)
`` |
| Methods defined here: __init__(self, message) `Displays a box prompting the user for a password. Creates a new master_proxy.MasterObject and starts the child process. The user is prompted for the root password.` get_root(self) `Raises UserAbort if the user cancels.`