Matt Wheeler wrote:
import importlib, os
importlib.import_module(os.path.split.__module__).__file__

'/Users/matt/.pyenv/versions/3.6.0/lib/python3.6/posixpath.py'

Or just look the module name up in sys.modules, if we know (as
we do here) that the module has already been imported.

--
Greg
--
https://mail.python.org/mailman/listinfo/python-list

Reply via email to