Try to install shell=True:
subprocess.call(["dir"], shell=True)
diris a shell program, meaning that the executable cannot be called. Therefore, dirit can only be called from the shell, therefore shell=True.
Please note that subprocess.callonly the command will be executed without giving you its output. It will return the exit status from it (usually 0 when it was successful).
, subprocess.check_output:
>>> subprocess.check_output(['dir'], shell=True)
' Datentr\x84ger in Laufwerk C: ist … and more German output'
, Unix: dir , /bin/dir PATH. Windows dir - cmd.exe Get-ChildItem PowerShell ( dir).