Unit 12-Python on the command line, Windows

Python CLI

Follow these instructions to run Python on the command line, which must be done for Unit 12 Threading problems.
these instructions/hints are to help with running all chapter 12 Python programs, especially those dealing with threading.

Install Python 3.10 or later, during install making sure to add Python to PATH
add to path
check by running 'path' in command prompt window, where one entery(there are many) will be:
C:\Users\wp8798rh\AppData\Local\Programs\Python\Python310\;

Easy to run these in CLI, open File Explorer, Right click file, choose 'Open'
easy open CLI

Or Open Windows Command Prompt, change directory to python program location
to run .py files, enter 'python' followed by file name:
C:\Users\wp8798rh\Threads>python s10_1b_sleepythreads.py
Enter the number of threads: 3
Enter the maximum sleep time: 6
Thread 1 starting, with sleep interval: 4 seconds
Thread 2 starting, with sleep interval: 3 seconds
Thread 3 starting, with sleep interval: 5 seconds
Thread 2 waking up
Thread 1 waking up
Thread 3 waking up
				

Set a path

Save all your code samples in your OneDrive/MIS312 folder, then go to by using the following:

C:\Users\wp8798rh>set "myCode=C:\Users\wp8798rh\OneDrive - MNSCU\MIS312"
						
C:\Users\wp8798rh>cd %myCode%
						
C:\Users\wp8798rh\OneDrive - MNSCU\MIS312>
					

PgP, 4/9/2024- One problem is some of the 'Network' programs in Chapter 12 use port 5000, and that throws an error because another process is using that port. 
You can instead use port 6000, or keep trying ports until you find one that works.

Chapter Section UI Notes
12 Prob 12-1; client/server time
Idle 3.11.1 deprecaton and changed names
12 12-2 client/server time
seems to work fine
12 Section 12-3d client/server time
it works- need to start timeserver first
       
12 Section 12-3e client/server chat
chat
chat client works
       
12 Section 10-3f
Case Study
doctor chat
chat
multi client works
start 'doctorserver.py' first
then run 'doctorclient.py'
       
Chapter Project UI Notes
12 Projects Solution files are in ClientServer or Threads folder
Threads solutions need to have deprecated items fixed
Other solutions should be study and run.
After examing these you should appreciate difficulty of creating a chat app.
Threading and Network Apps
       
       
       
       
       
       
       
       
       
Chapter Project UI Notes