Chapter 10-Python on the command line, Windows

Python CLI

Follow these instructions to run Python on the command line, which must be done for Unit 10 Threading problems.
these instructions/hints are to help with running all chapter 10 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\;

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

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>
					

Problem is you have to run these commands when you open new CMD window.
instead can copy entire path from FileExplorer into CMD window, precede by 'cd '

Chapter Section UI Notes
10 Section 10-3d client/server time
it works- need to start timeserver first
       
10 Section 10-3e client/server chat
chat
chat client works
       
10 Section 10-3f
Case Study
doctor chat
chat
multi client works
start 'doctorserver.py' first
then run 'doctorclient.py'
       
Chapter Project UI Notes
10 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