I work on Windows 7 with Python IDLE. I have two programs,
# progA while True: m = input('progA is running ') print (m)
and
# progB while True: m = input('progB is running ') print (m)
I open IDLE and then open the progA.py file. I run the program, and when prompted for input, type "b" + <Enter> and then "c" + <Enter>
I look at this window:
Python 3.6.3 (v3.6.3:2c5fed8, Oct 3 2017, 17:26:49) [MSC v.1900 32 bit (Intel)] on win32 Type "copyright", "credits" or "license()" for more information. >>> = RESTART: C:\Users\Mike\AppData\Local\Programs\Python\Python36-32\progA.py = progA is running b b progA is running c c progA is running
Then I go back to Windows Start and open IDLE again, this time opening the progB.py file. I run the program, and when prompted for input, type "x" + <Enter> and then "y" + <Enter>
I look at this window:
Python 3.6.3 (v3.6.3:2c5fed8, Oct 3 2017, 17:26:49) [MSC v.1900 32 bit (Intel)] on win32 Type "copyright", "credits" or "license()" for more information. >>> = RESTART: C:\Users\Mike\AppData\Local\Programs\Python\Python36-32\progB.py = progB is running x x progB is running y y progB is running
Now two IDLE Python 3.6.3 Shell programs run at the same time, one shell starts progA and the other progB.
source share