1CMD /K - execute a command then remain
2
3import os
4os.system('cmd /k "Your Command Prompt Command"')
5
1import os
2
3os.system("ma Commande")
4
5#Exemple:
6
7os.system("cd Documents")
1# press [windows] + [R] (on windows only)
2# use the command : cd/the_way_of_your_program
3# and now use this command :
4
5py the_name_of_your_program.py
6
7# don't forget to write the extension (py for python)
8# at the end of your program name
1// To run pytho script from CMD
2// type python and the name of the file. Assuming hello.py
3
4python hello.py