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 | ||||||||||
|