This is how your computer's operating system executes Python script:
- When you type python <your_awesome_automation_script>.py in the shell, Python (which runs as a process) instructs your computer processor to schedule a thread (which is the smallest unit of processing):
- The allocated thread will start to execute your script, line by line. A thread can do anything, including interacting with I/O devices, connecting to routers, printing output, performing mathematical equations, and more.
- Once the script hits the End of File (EOF), the thread will be terminated and returned to the free pool, to ...