def get_relative_path(path):
 components = split_all(path)
 if (len(components) <= 1):
  return os.curdir
 else:
  parents = ([os.pardir] * (len(components) - 1))
  return os.path.join(*parents)

def get_relative_path ( path ) : components = split_all ( path ) if ( len ( components ) <= 1 ) : return os . curdir else : parents = ( [ os . pardir ] * ( len ( components ) - 1 ) ) return os . path . join ( * parents )
return the relative path from the given path to the root path .