xxxxxxxxxx
import os
os.system('cmd /k "Your Command Prompt Command"')
xxxxxxxxxx
CMD /K - execute a command then remain
import os
os.system('cmd /k "Your Command Prompt Command"')
xxxxxxxxxx
import os
os.system("ma Commande")
#Exemple:
os.system("cd Documents")
xxxxxxxxxx
// To run pytho script from CMD
// type python and the name of the file. Assuming hello.py
python hello.py
xxxxxxxxxx
python -c "for i in range(3): import numpy as np; print(np.ones(4))"
# With this syntax, remember to write str like: python -c "print('hi Brazil')"