sudo en python
sudoPassword = 'mypass'
command = 'ls'
p = os.system('echo %s|sudo -S %s' % (sudoPassword, command))
Thebetta
sudoPassword = 'mypass'
command = 'ls'
p = os.system('echo %s|sudo -S %s' % (sudoPassword, command))