Assuming I have two Python modules and path_b is in the import path:
# file: path_b/my_module.py print \"I was imported from ???\" #file: path_a/app.py impo
This is how I do it:
print(module_name.__path__)