
A process running all-by-itself is like a horse running all alone. While we might enjoy the ride, the imagination begins to wonder what many horses - working together - might accomplish!
Upon the realization that any computer system has many other types of processes we are able to work with, the imagination is now set so as to enable our Python applications to do many fascinating things. -From connecting to web sites & downloading data, to sending us text messages or load-balancing our workstations, there is never a need to re-invent the wheel when there are so many other vehicles for us to use.
In this training we will cover the width & breadth of what you will need to invoke & and manage built-in "shell" operations, as well as external programs.
THE DOWNLOADABLE RESOURCE FILES ARE WITH "08000: POSIX Forks & Pipes."
In this lesson we will learn how to locate files on most operating systems. Reviewing Windows -v- POSIX pathing, we will use Python to create to help us enumerate all of the locations found along our default operating-system path. Along the way, we will also review how to determine which type of (i.e. Windows or POSIX) operating system we are running on.
While Python's built-in documentation is presently next to nothing for the os popen() operation, I have found that one | best practice | is to use os.popen() whenever we need to simply READ ('stdin',) what another process WRITES ('stdout'.)
A "must have" technique to re-use, in this module we demonstrate how to capture Python's help() output so as to be able to create files for each and every callable operation in any module.
By chaining inputs and outputs together, we discussed how software can fit together.
In as much as both Windows and POSIX each have a basic sorting capability, our first cross-platform task will be to re-use the external command from Python.
In this lesson, we will:
Write a cross-platform program to re-use the SORT command on 'nt' and 'posix.'
Learn how to send data to an external command using the standard-output
Discover how to retrieve the exit() code from an external application
Many software developers are surprised to discover that many commands we use every day are actually “built in” to a command interpreter.
While a source of confusion for many new software developers, in this lesson we will demystify the process by demonstrating how to invoke built-in commands from Python 3.
The goals for this lesson are to:
Understand the difference between external and commands
Learn how to interface with non-shell programs to automate command-line interfaces
When used as a “shell tool,” Python can be used to run everything from simple Python expressions, to complete applications & testing scenarios.
In this lesson, we will:
Learn how to implicitly and explicitly use Popen to run Python files
Learn how call and external script
Discover how to use Python as a “shell” or “command line” processor.
The name “recursion” sounds complicated, but the idea of iteratively processing items such as nested folders is as simple as it is power full.
• Learn how call an parameterized, external, Python Script .
• Discover how to “filter” local directory content .
• Write a program to count files in a directory.
• Create & call a program that can iteratively search, tally, and report on directory trees & content.
Review & test a parent / child set of processes. Designed to leverage the operating-system to cooperatively work together, feel free to modify the re-usable duo to power your own GIL-avoiding inspirations!
If you are lucky enough to be using a POSIX-inspired operating system, then those classic IPC operations ... are still available!
Python 3000: Inter-Process Communications (IPC) will draw upon our experience with Python 3 in order to learn how to re-use the work of other developers, no matter which programming language a program was written.
Advanced Concepts
Not only are the techniques taught in 3000 IPC widely available, but also required to understand how to start, stop, as well as to monitor our own, as well as other, software applications.
Sharing Data
From passing startup-parameters to “piping” data in and out of other applications, 'Pythoneers will find 3000 IPC lessons truly valuable both on-the-job, as well as on many personal projects.
Combining Power
By leveraging the inter-process communication (IPC) abilities of Python, you will discover the common denominator required for program to program communications. Using 100% pure Python, no third party utilities, projects, or source code is required!
Professional Power-Up
Professionals interested in discovering cross-platform software automation & testing techniques will also enjoy these lessons. If you are interested in supporting, creating, automating, and testing DevOps solutions you will find this 3000 IPC educational opportunity critically important, as well.
Create and Test
No matter if we are creating Python programs that need to be able to inter-communicate & inter-operate, or testing programs written in any other programming technology, DevOps, Testers, and 'Pythoneers of all description will find these Python 3000: Inter-Process Communications lessons invaluable.