python location of module code example Example: python find location of module import mymodule mymodule.__file__