

def rewritepath(os, path):
    components = parts(path)
    newpath = ''
    if (os == 'nt'):
        for item in components:
            newpath = ((newpath + '\\') + item)
    elif (os == 'posix'):
        for item in components:
            newpath = ((newpath + '/') + path)
    elif (os == 'url'):
        for item in components:
            newpath = ((newpath + '/') + item)
        newpath = url_fix(newpath)
    newpath = newpath[1:]
    return newpath

dataset/ETHPy150Open ksiazkowicz/orphilia-dropbox/shared/path_rewrite.py rewritepath/VarMisuse@78/93 `item`->`path`