For example, take a simple program
from subprocess import check_output
t = check_output(['ls', '-a'])
print t
now there are many commands which needs to be run with sudo permission. for given example
from subprocess import check_output
t = check_output(['sudo', 'ls', '-a'])
print t
but it asks for password in my terminal. instead I want to input the password programatically, even bypass this, if possible.