Sudo в Python

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