def find_mod(module_name):
 parts = module_name.split('.')
 basepath = find_module(parts[0])
 for submodname in parts[1:]:
  basepath = find_module(submodname, [basepath])
 if (basepath and os.path.isdir(basepath)):
  basepath = get_init(basepath)
 return basepath

def find_mod ( module_name ) : parts = module_name . split ( '.' ) basepath = find_module ( parts [ 0 ] ) for submodname in parts [ 1 : ] : basepath = find_module ( submodname , [ basepath ] ) if ( basepath and os . path . isdir ( basepath ) ) : basepath = get_init ( basepath ) return basepath
find module module_name on sys .