def get_module_root(path):
 while (not module_manifest(path)):
  new_path = os.path.abspath(opj(path, os.pardir))
  if (path == new_path):
   return None
  path = new_path
 return path

def get_module_root ( path ) : while ( not module_manifest ( path ) ) : new_path = os . path . abspath ( opj ( path , os . pardir ) ) if ( path == new_path ) : return None path = new_path return path
get closest modules root begining from path # given: # /foo/bar/module_dir/static/src/ .