Skip to content Skip to sidebar Skip to footer

Python3 Subprocess Call Not Working

Python3 subprocess call not working import subprocess subprocess.call('sudo nautilus')

Solution 1:

Try this one:

subprocess.call(["sudo", "nautilus"])

Solution 2:

You have to use the shell = true to make it work in the shell

import subprocess 
 subprocess.call("sudo nautilus", shell=True)

OR u can output it a s a list

 subprocess.call(["sudo", "nautilus"])

Solution 3:

Try setting shell=True, so:

subprocess.call("sudo nautilus",shell=True)

Post a Comment for "Python3 Subprocess Call Not Working"