def path_getrootdir(path):
 (drive, _) = os.path.splitdrive(path)
 if drive:
  return (drive + os.path.sep)
 return os.path.sep

def path_getrootdir ( path ) : ( drive , _ ) = os . path . splitdrive ( path ) if drive : return ( drive + os . path . sep ) return os . path . sep
extract rootdir from path in a platform independent way .