from subprocess import call call(["ls", "-l"])
this returns
FileNotFoundError: [WinError 2] The system cannot find the file specified
from subprocess import call call(["ls", "-l"])
this returns
FileNotFoundError: [WinError 2] The system cannot find the file specified
First of all you are using a linux command on Windows OS like Marco Bonelli mentioned.
You should change the ls command to Windows equivalent like this:
subprocess.call(["dir","/Q"],shell = True)
We specify shell=True
because dir command is built-in to shell, otherwise you would get the same error.