def get_init_path(directory_path):
 for (suffix, _, _) in imp.get_suffixes():
  path = os.path.join(directory_path, ('__init__' + suffix))
  if os.path.exists(path):
   return path
 return None

def get_init_path ( directory_path ) : for ( suffix , _ , _ ) in imp . get_suffixes ( ) : path = os . path . join ( directory_path , ( '__init__' + suffix ) ) if os . path . exists ( path ) : return path return None
the __init__ file can be searched in a directory .