On Nov 8, 2019, at 18:14, Brian Skinn
For nonbuiltins, the full path to the relevant .py is returned:
inspect.getfile(inspect) 'C:\\...\\Python\\Python37\\Lib\\inspect.py'
What does it do for zipimported modules, bootstrapped modules, modules distributed as a .pyc file without the .py source, etc., plain old .py filed but that are found in an unusual way (a 3.x equivalent of Appleās 2.7 Extras directory, or even a custom importlib finder), whatever Pythonista does on iOS, etc., much less modules that use a custom loader? Also, even for normal .py imports on a stock CPython on Windows or Mac installation, can a non-sophisticated user (or automated software) reliably distinguish system, site, added-by-old-school-egg, user, venv, script-dir, and custom based on the pathname?