0

Suppose I want to launch command prompt and write different command there. How Can I do this by simply running one python script?

Ani
  • 53
  • 1
  • 7

1 Answers1

1

Take a look at this previous answer. Running windows shell commands with python I believe it has what you are looking for.

Community
  • 1
  • 1
Deengus
  • 75
  • 1
  • 9
  • when running the following command : >>> from subprocess import check_output >>> check_output("dir C :", shell =True).decode() I am getting errors like : File "C:\Users\XYZ\AppData\Local\Programs\Python\Python35-32\lib\subprocess.py", line 629, in check_output **kwargs).stdout – Ani Apr 21 '16 at 17:36