def escape_path(path):
    # There's no knowing what character encoding was used to create URLs
    # containing %-escapes, but since we have to pick one to escape invalid
    # path characters, we pick UTF-8, as recommended in the HTML 4.0
    # specification:
    # http://www.w3.org/TR/REC-html40/appendix/notes.html#h-B.2.1
    # And here, kind of: draft-fielding-uri-rfc2396bis-03
    # (And in draft IRI specification: draft-duerst-iri-05)
    # (And here, for new URI schemes: RFC 2718)
    if isinstance(path, unicode):
        path = path.encode("utf-8")
    path = urllib.quote(path, HTTP_PATH_SAFE)
    path = ESCAPED_CHAR_RE.sub(uppercase_escaped_char, path)
    return path
Harness to test if the FrameSet.isdisjoint call works properly.
dataset/ETHPy150Open babble/babble/include/jython/Lib/cookielib.py/escape_path--crossover with--dataset/ETHPy150Open sqlboy/fileseq/test/run.py/TestFrameSet._check_isdisjoint