So I\'m trying to get a process to be run as a super user from within a python script using subprocess. In the ipython shell something like
proc = subproces
You have to use Popen like this:
cmd = ['sudo', 'apache2ctl', 'restart'] proc = subprocess.Popen(cmd, shell=True, stdin=subprocess.PIPE, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
It expects a list.