Module Import alias Import alias Import alias Import alias alias alias FunctionDef arguments args NameParam defaults body Expr Str If UnaryOpNot Call NameLoad NameLoad TupleLoad NameLoad NameLoad body Raise Call NameLoad BinOpMod Str Call NameLoad NameLoad Assign TupleStore NameStore NameStore NameStore NameStore NameStore NameLoad Assign NameStore Str If CompareIsNot NameLoad NameLoad body AugAssignAdd NameStore BinOpAdd NameLoad Str If CompareIsNot NameLoad NameLoad body AugAssignAdd NameStore BinOpAdd Str NameLoad AugAssignAdd NameStore NameLoad If CompareIsNot NameLoad NameLoad body AugAssignAdd NameStore BinOpAdd Str NameLoad If CompareIsNot NameLoad NameLoad body AugAssignAdd NameStore BinOpAdd Str NameLoad Return NameLoad decorator_list Assign NameStore Call AttributeLoad NameLoad attr Str FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Call AttributeLoad Call AttributeLoad NameLoad attr NameLoad attr Assign NameStore SubscriptLoad NameLoad Index Str Assign NameStore SubscriptLoad NameLoad Index Str Assign NameStore SubscriptLoad NameLoad Index Str Assign NameStore SubscriptLoad NameLoad Index Str Assign NameStore SubscriptLoad NameLoad Index Str Return TupleLoad NameLoad NameLoad NameLoad NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str If UnaryOpNot NameLoad body Raise Call NameLoad Str If UnaryOpNot Call NameLoad NameLoad body Raise Call NameLoad BinOpMod Str NameLoad If BoolOpOr CompareEq NameLoad Str CompareEq SubscriptLoad NameLoad Index Num Str body Return BinOpAdd SubscriptLoad Call AttributeLoad NameLoad attr Str Index Num NameLoad Assign NameStore NameStore NameStore NameStore NameLoad Assign TupleStore NameStore NameStore NameStore NameStore NameStore Call NameLoad NameLoad If CompareIsNot NameLoad NameLoad body Assign NameStore NameLoad Assign NameStore NameLoad Assign NameStore Call NameLoad NameLoad Assign NameStore NameLoad orelse Assign TupleStore NameStore NameStore NameStore NameStore NameStore Call NameLoad NameLoad If CompareIsNot NameLoad NameLoad body Assign NameStore NameLoad Assign NameStore Call NameLoad NameLoad Assign NameStore NameLoad orelse If UnaryOpNot NameLoad body Assign NameStore NameLoad Assign NameStore BoolOpOr BoolOpAnd CompareIsNot NameLoad NameLoad NameLoad NameLoad orelse If CompareEq SubscriptLoad NameLoad Index Num Str body Assign NameStore Call NameLoad NameLoad orelse If BoolOpAnd CompareIsNot NameLoad NameLoad UnaryOpNot NameLoad body Assign NameStore BinOpAdd Str NameLoad orelse Assign NameStore BinOpAdd SubscriptLoad NameLoad Slice BinOpAdd Call AttributeLoad NameLoad attr Str Num NameLoad Assign NameStore Call NameLoad NameLoad Assign NameStore NameLoad Assign NameStore NameLoad Assign NameStore NameLoad Return Call NameLoad TupleLoad NameLoad NameLoad NameLoad NameLoad NameLoad decorator_list Assign NameStore Call AttributeLoad NameLoad attr Str FunctionDef arguments args NameParam defaults body Expr Str If Call NameLoad NameLoad NameLoad body TryExcept body Assign NameStore Call AttributeLoad NameLoad attr Str handlers ExceptHandler type NameLoad body Raise Call NameLoad BinOpMod Str NameLoad Assign TupleStore NameStore NameStore NameStore NameStore NameStore Call AttributeLoad NameLoad attr NameLoad If BoolOpAnd NameLoad CompareGt Call AttributeLoad NameLoad attr Str Num body Assign TupleStore NameStore NameStore Call AttributeLoad NameLoad attr Str orelse Assign NameStore NameLoad Assign NameStore NameLoad If BoolOpAnd NameLoad CompareGt Call AttributeLoad NameLoad attr Str Num body Assign TupleStore NameStore NameStore Call AttributeLoad NameLoad attr Str orelse Assign NameStore NameLoad Assign NameStore NameLoad If BoolOpAnd NameLoad Call AttributeLoad NameLoad attr NameLoad body Assign NameStore Call AttributeLoad NameLoad attr NameLoad If CompareGtE SubscriptLoad AttributeLoad NameLoad attr Slice Num Num TupleLoad Num Num body If Call NameLoad NameLoad NameLoad body Assign NameStore Call AttributeLoad NameLoad attr Str Assign NameStore Call AttributeLoad NameLoad attr Str Assign NameStore Str If NameLoad body AugAssignAdd NameStore BinOpAdd NameLoad Str AugAssignAdd NameStore NameLoad If NameLoad body AugAssignAdd NameStore BinOpAdd Str NameLoad If BoolOpAnd CompareEq AttributeLoad NameLoad attr Str CompareEq NameLoad Str body Assign NameStore Call AttributeLoad NameLoad attr Str Str Num Assign NameStore Call AttributeLoad NameLoad attr TupleLoad NameLoad NameLoad NameLoad NameLoad NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str If Call NameLoad NameLoad body Return Call NameLoad NameLoad NameLoad orelse Assign NameStore Str Assign NameStore Call NameLoad NameLoad BinOpMod Str TupleLoad NameLoad NameLoad If Call NameLoad NameLoad body Return NameLoad orelse Return SubscriptLoad NameLoad Slice BinOpAdd Call NameLoad NameLoad Num decorator_list FunctionDef arguments args NameParam defaults body Expr Str If BoolOpOr CompareEq NameLoad Str CompareEq NameLoad Str body Return SubscriptLoad NameLoad Slice Num Num While NameLoad body If CompareEq SubscriptLoad NameLoad Slice Num Str body Assign NameStore SubscriptLoad NameLoad Slice Num orelse If CompareEq SubscriptLoad NameLoad Slice Num Str body Assign NameStore SubscriptLoad NameLoad Slice Num orelse Break Assign NameStore Num If CompareEq SubscriptLoad NameLoad Slice Num Str body Assign NameStore SubscriptLoad NameLoad Slice Num Assign NameStore Num If CompareEq SubscriptLoad NameLoad Slice Num Str body Assign NameStore SubscriptLoad NameLoad Slice Num Assign NameStore Call AttributeLoad NameLoad attr Str Assign NameStore ListLoad Expr Call AttributeLoad NameLoad attr While NameLoad body Assign NameStore Call AttributeLoad NameLoad attr If CompareEq NameLoad Str body If NameLoad body Expr Call AttributeLoad NameLoad attr orelse If UnaryOpNot NameLoad body Expr Call AttributeLoad NameLoad attr NameLoad If UnaryOpNot NameLoad body Expr Call AttributeLoad NameLoad attr Str orelse If CompareNotEq NameLoad Str body Expr Call AttributeLoad NameLoad attr NameLoad Return BinOpAdd BinOpMult NameLoad Str Call AttributeLoad Str attr NameLoad decorator_list Assign NameStore Call AttributeLoad NameLoad attr Str FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Call AttributeLoad NameLoad attr NameLoad If CompareIs NameLoad NameLoad body Return NameLoad orelse Return Call AttributeLoad NameLoad attr Num decorator_list FunctionDef arguments args NameParam defaults body Expr Str Return CompareIsNot Call NameLoad NameLoad NameLoad decorator_list
N/A N/A os.path N/A sys N/A re N/A urlparse urllib urllib2 UnsplitUriRef N/A N/A uriRefSeq N/A N/A N/A should replace urlparse.urlunsplit

    Given a sequence as would be produced by SplitUriRef(), assembles and
    returns a URI reference as a string.
     N/A N/A N/A isinstance uriRefSeq N/A tuple list N/A N/A N/A TypeError N/A sequence expected, got %s N/A type uriRefSeq N/A N/A scheme authority path query fragment uriRefSeq N/A uri N/A N/A scheme None N/A N/A uri N/A scheme : N/A N/A authority None N/A N/A uri N/A // authority N/A uri path N/A N/A query None N/A N/A uri N/A ? query N/A N/A fragment None N/A N/A uri N/A # fragment N/A uri N/A N/A SPLIT_URI_REF_PATTERN N/A N/A re compile ^(?:(?P<scheme>[^:/?#]+):)?(?://(?P<authority>[^/?#]*))?(?P<path>[^?#]*)(?:\?(?P<query>[^#]*))?(?:#(?P<fragment>.*))?$ SplitUriRef N/A N/A uriref N/A N/A N/A should replace urlparse.urlsplit

    Given a valid URI reference as a string, returns a tuple representing the
    generic URI components, as per RFC 2396 appendix B. The tuple's structure
    is (scheme, authority, path, query, fragment).

    All values will be strings (possibly empty) or None if undefined.

    Note that per rfc3986, there is no distinction between a path and
    an "opaque part", as there was in RFC 2396.
     N/A g N/A N/A N/A N/A SPLIT_URI_REF_PATTERN match uriref groupdict N/A scheme N/A g N/A scheme N/A authority N/A g N/A authority N/A path N/A g N/A path N/A query N/A g N/A query N/A fragment N/A g N/A fragment N/A N/A scheme authority path query fragment N/A Absolutize N/A N/A uriRef baseUri N/A N/A N/A 
    Resolves a URI reference to absolute form, effecting the result of RFC
    3986 section 5. The URI reference is considered to be relative to the
    given base URI.

    It is the caller's responsibility to ensure that the base URI matches
    the absolute-URI syntax rule of RFC 3986, and that its path component
    does not contain '.' or '..' segments if the scheme is hierarchical.
    Unexpected results may occur otherwise.

    This function only conducts a minimal sanity check in order to determine
    if relative resolution is possible: it raises a UriException if the base
    URI does not have a scheme component. While it is true that the base URI
    is irrelevant if the URI reference has a scheme, an exception is raised
    in order to signal that the given string does not even come close to
    meeting the criteria to be usable as a base URI.

    It is the caller's responsibility to make a determination of whether the
    URI reference constitutes a "same-document reference", as defined in RFC
    2396 or RFC 3986. As per the spec, dereferencing a same-document
    reference "should not" involve retrieval of a new representation of the
    referenced resource. Note that the two specs have different definitions
    of same-document reference: RFC 2396 says it is *only* the cases where the
    reference is the empty string, or "#" followed by a fragment; RFC 3986
    requires making a comparison of the base URI to the absolute form of the
    reference (as is returned by the spec), minus its fragment component,
    if any.

    This function is similar to urlparse.urljoin() and urllib.basejoin().
    Those functions, however, are (as of Python 2.3) outdated, buggy, and/or
    designed to produce results acceptable for use with other core Python
    libraries, rather than being earnest implementations of the relevant
    specs. Their problems are most noticeable in their handling of
    same-document references and 'file:' URIs, both being situations that
    come up far too often to consider the functions reliable enough for
    general use.
     N/A N/A baseUri N/A N/A N/A ValueError baseUri is required and must be a non empty string N/A N/A N/A IsAbsolute baseUri N/A N/A N/A ValueError N/A %r is not an absolute URI baseUri N/A N/A N/A uriRef N/A N/A uriRef N/A 0 # N/A N/A N/A N/A N/A N/A baseUri split # N/A 0 uriRef N/A tScheme tAuth tPath tQuery None N/A N/A rScheme rAuth rPath rQuery rFrag N/A SplitUriRef uriRef N/A N/A rScheme None N/A N/A tScheme rScheme N/A tAuth rAuth N/A tPath N/A RemoveDotSegments rPath N/A tQuery rQuery N/A N/A N/A bScheme bAuth bPath bQuery bFrag N/A SplitUriRef baseUri N/A N/A rAuth None N/A N/A tAuth rAuth N/A tPath N/A RemoveDotSegments rPath N/A tQuery rQuery N/A N/A N/A rPath N/A N/A tPath bPath N/A tQuery N/A N/A N/A rQuery None rQuery bQuery N/A N/A N/A N/A rPath N/A 0 / N/A N/A tPath N/A RemoveDotSegments rPath N/A N/A N/A N/A bAuth None N/A bPath N/A N/A tPath N/A / rPath N/A N/A tPath N/A N/A bPath N/A N/A N/A N/A bPath rfind / 1 rPath N/A tPath N/A RemoveDotSegments tPath N/A tQuery rQuery N/A tAuth bAuth N/A tScheme bScheme N/A N/A UnsplitUriRef N/A tScheme tAuth tPath tQuery rFrag N/A N/A REG_NAME_HOST_PATTERN N/A N/A re compile ^(?:(?:[0-9A-Za-z\-_\.!~*'();&=+$,]|(?:%[0-9A-Fa-f]{2}))*)$ MakeUrllibSafe N/A N/A uriRef N/A N/A N/A 
    Makes the given RFC 3986-conformant URI reference safe for passing
    to legacy urllib functions. The result may not be a valid URI.

    As of Python 2.3.3, urllib.urlopen() does not fully support
    internationalized domain names, it does not strip fragment components,
    and on Windows, it expects file URIs to use '|' instead of ':' in the
    path component corresponding to the drivespec. It also relies on
    urllib.unquote(), which mishandles unicode arguments. This function
    produces a URI reference that will work around these issues, although
    the IDN workaround is limited to Python 2.3 only. May raise a
    UnicodeEncodeError if the URI reference is Unicode and erroneously
    contains non-ASCII characters.
     N/A N/A isinstance uriRef unicode N/A N/A N/A N/A uriRef N/A N/A uriRef encode us-ascii N/A N/A N/A UnicodeError N/A N/A N/A ValueError N/A uri %r must consist of ASCII characters. uriRef N/A N/A scheme auth path query frag N/A N/A urlparse urlsplit uriRef N/A N/A auth N/A N/A N/A auth find @ -1 N/A N/A N/A userinfo hostport N/A N/A auth split @ N/A N/A userinfo None N/A hostport auth N/A N/A hostport N/A N/A N/A hostport find : -1 N/A N/A N/A host port N/A N/A hostport split : N/A N/A host hostport N/A port None N/A N/A host N/A N/A REG_NAME_HOST_PATTERN match host N/A N/A host N/A N/A urllib unquote host N/A N/A N/A N/A sys version_info N/A 0 2 N/A 2 3 N/A N/A N/A isinstance host str N/A N/A host N/A N/A host decode utf-8 N/A host N/A N/A host encode idna N/A auth N/A userinfo N/A N/A auth N/A userinfo @ N/A auth host N/A port N/A N/A auth N/A : port N/A N/A N/A N/A os name nt N/A scheme file N/A N/A path N/A N/A path replace : | 1 N/A uri N/A N/A urlparse urlunsplit N/A scheme auth path query None N/A uri N/A BaseJoin N/A N/A base uriRef N/A N/A N/A 
    Merges a base URI reference with another URI reference, returning a
    new URI reference.

    It behaves exactly the same as Absolutize(), except the arguments
    are reversed, and it accepts any URI reference (even a relative URI)
    as the base URI. If the base has no scheme component, it is
    evaluated as if it did, and then the scheme component of the result
    is removed from the result, unless the uriRef had a scheme. Thus, if
    neither argument has a scheme component, the result won't have one.

    This function is named BaseJoin because it is very much like
    urllib.basejoin(), but it follows the current rfc3986 algorithms
    for path merging, dot segment elimination, and inheritance of query
    and fragment components.

    WARNING: This function exists for 2 reasons: (1) because of a need
    within the 4Suite repository to perform URI reference absolutization
    using base URIs that are stored (inappropriately) as absolute paths
    in the subjects of statements in the RDF model, and (2) because of
    a similar need to interpret relative repo paths in a 4Suite product
    setup.xml file as being relative to a path that can be set outside
    the document. When these needs go away, this function probably will,
    too, so it is not advisable to use it.
     N/A N/A IsAbsolute base N/A N/A N/A Absolutize uriRef base N/A N/A dummyscheme basejoin N/A res N/A Absolutize uriRef N/A %s:%s N/A dummyscheme base N/A N/A IsAbsolute uriRef N/A N/A res N/A N/A N/A res N/A N/A N/A len dummyscheme 1 N/A RemoveDotSegments N/A N/A path N/A N/A N/A 
    Supports Absolutize() by implementing the remove_dot_segments function
    described in RFC 3986 sec. 5.2.  It collapses most of the '.' and '..'
    segments out of a path without eliminating empty segments. It is intended
    to be used during the path merging process and may not give expected
    results when used independently. Use NormalizePathSegments() or
    NormalizePathSegmentsInUri() if more general normalization is desired.

    semi-private because it is not for general use. I've implemented it
    using two segment stacks, as alluded to in the spec, rather than the
    explicit string-walking algorithm that would be too inefficient. (mbrown)
     N/A N/A N/A path . N/A path .. N/A N/A N/A path N/A 0 0 N/A path N/A N/A N/A N/A path N/A 2 ./ N/A N/A path N/A path N/A 2 N/A N/A N/A N/A path N/A 3 ../ N/A N/A path N/A path N/A 3 N/A N/A N/A leading_slash 0 N/A N/A N/A path N/A 1 / N/A N/A path N/A path N/A 1 N/A leading_slash 1 N/A N/A N/A path N/A -2 /. N/A N/A path N/A path N/A -1 N/A segments N/A N/A path split / N/A keepers N/A N/A N/A N/A segments reverse N/A segments N/A N/A seg N/A N/A segments pop N/A N/A seg .. N/A N/A keepers N/A N/A N/A N/A keepers pop N/A N/A N/A leading_slash N/A N/A N/A N/A keepers append seg N/A N/A segments N/A N/A N/A N/A keepers append N/A N/A N/A seg . N/A N/A N/A N/A keepers append seg N/A N/A N/A leading_slash / N/A N/A / join keepers N/A N/A SCHEME_PATTERN N/A N/A re compile ([a-zA-Z][a-zA-Z0-9+\-.]*): GetScheme N/A N/A uriRef N/A N/A N/A 
    Obtains, with optimum efficiency, just the scheme from a URI reference.
    Returns a string, or if no scheme could be found, returns None.
     N/A m N/A N/A SCHEME_PATTERN match uriRef N/A N/A m None N/A N/A None N/A N/A N/A N/A m group 1 N/A IsAbsolute N/A N/A identifier N/A N/A N/A 
    Given a string believed to be a URI or URI reference, tests that it is
    absolute (as per RFC 2396), not relative -- i.e., that it has a scheme.
     N/A N/A N/A GetScheme identifier None N/A