I want to open a cmd window using Python. I think I can use os library but I don't know how.
- Do you just want to open a cmd window? Or do you want to execute a cmd command?Guy– Guy2022-08-12 14:41:56 +00:00Commented Aug 12, 2022 at 14:41
- 1Does this answer your question? Python: Start new command prompt on Windows and wait for it finish/exitrochard4u– rochard4u2022-08-12 14:43:16 +00:00Commented Aug 12, 2022 at 14:43
Add a comment |
2 Answers
Similar to Python: Start new command prompt on Windows and wait for it finish/exit
import os os.system("start /wait cmd /c cmd") Should do the trick!