Holy crap! I somehow managed to take the reference implementation code from PEP 723 and turn it into something functional, for me.

Big time baby steps. I learned something this week!

https://peps.python.org/pep-0723/

#python

PEP 723 – Inline script metadata | peps.python.org

This PEP specifies a metadata format that can be embedded in single-file Python scripts to assist launchers, IDEs and other external tools which may need to interact with such scripts.

Python Enhancement Proposals (PEPs)