CMD /K - execute a command then remain
import os
os.system('cmd /k "Your Command Prompt Command"')
import os
os.system("javac lolol.java")# or something....
import os
os.system('cmd /k "Your Command Prompt Command"')
just write your file name and hit enter