how to check the path of a module in python code example Example: how to get module path in python import a_module print(a_module.__file__)