def ensure_relative(path):
 (drive, path) = os.path.splitdrive(path)
 if (sys.platform == 'mac'):
  return (os.sep + path)
 else:
  if (path[0:1] == os.sep):
   path = (drive + path[1:])
  return path

def ensure_relative ( path ) : ( drive , path ) = os . path . splitdrive ( path ) if ( sys . platform == 'mac' ) : return ( os . sep + path ) else : if ( path [ 0 : 1 ] == os . sep ) : path = ( drive + path [ 1 : ] ) return path
take the full path path .