Yep.
FYI, some of our python scripts (on OpenVMS) run more than 1,000 times per day, so it is really important to us to have the JIT compiling to __pycache__ working properly.
On our Linux platforms,
1) a BASH script first "sources a file with database account info" (think logical name tables on OpenVMS) then calls the python loader script
2) the python loader script starts python, then loads the desired program via (import) which invokes all the JIT checks
3) the last line calls "main()" in the destination code
This Linux description is the closest to my demo #3 which employs $DECK + $EOD. But I'm going to return to our Linux system today to explore the possibility of having the BASH script activate the destination python script via the "python -m file.py". On this system we have hundreds of python programs, so moving from 3 files to 2 would help a lot.
###################
Off topic comment: According to PEP-333 and PEP-3333, all web programming is supposed to shift from mod_cgi (and the python cgi module) to mod_wsdi. Last month I did a significant exploration of wsgi programming on Linux, and IMHO it does not pass my risk-reward sniff test. We will either install the replacement module "legacy-cgi" (available from pypi.org), or write our own.