I want to open a cmd window and use it to print some variables. The problem is that, the code below, opens 5 independent windows (ovbiously).
import os for i in range(0,5): command = "start cmd /K echo " + str(i+1) os.system(command) I dont know if I can have a reference or a link to the already opened window to send it the commands.
The desired result would be...
1 2 3 4 5 ...on the same window
The purpose is to be able to print on that window certain variables during the execution of a code.
I'm stucked and I don't know if that is even possible. Im on W10 with Python 2.7
Thank you very much