On Nov 8, 2019, at 18:14, Brian Skinn <brian.sk...@gmail.com> wrote: > > 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? _______________________________________________ Python-ideas mailing list -- python-ideas@python.org To unsubscribe send an email to python-ideas-le...@python.org https://mail.python.org/mailman3/lists/python-ideas.python.org/ Message archived at https://mail.python.org/archives/list/python-ideas@python.org/message/AQFKUCXCYK6BKX4BNQA2LEODNQZWS2S2/ Code of Conduct: http://python.org/psf/codeofconduct/