Module Expr Str Import alias alias Assign NameStore Call AttributeLoad NameLoad attr Str FunctionDef arguments args NameParam NameParam defaults body If CompareEq Call NameLoad NameLoad Call NameLoad Str body Assign NameStore Call AttributeLoad NameLoad attr NameLoad Str Assign NameStore Call AttributeLoad NameLoad attr Return Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr NameLoad Str decorator_list FunctionDef arguments args NameParam defaults body Expr Str Return UnaryOpNot Call NameLoad Call AttributeLoad NameLoad attr NameLoad decorator_list Assign NameStore AttributeLoad Call AttributeLoad NameLoad attr Str attr FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Call NameLoad NameLoad If NameLoad body Assign NameStore Call AttributeLoad NameLoad attr Return TupleLoad SubscriptLoad NameLoad Index Num SubscriptLoad NameLoad Index Num SubscriptLoad NameLoad Index Num SubscriptLoad NameLoad Index Num SubscriptLoad NameLoad Index Num decorator_list FunctionDef arguments args NameParam defaults body Assign TupleStore NameStore NameStore NameStore NameStore NameStore NameLoad Assign NameStore ListLoad Assign NameStore AttributeLoad NameLoad attr If CompareIsNot NameLoad NameLoad body Expr Call NameLoad NameLoad Expr Call NameLoad Str If CompareIsNot NameLoad NameLoad body Expr Call NameLoad Str Expr Call NameLoad NameLoad Expr Call NameLoad NameLoad If CompareIsNot NameLoad NameLoad body Expr Call NameLoad Str Expr Call NameLoad NameLoad If CompareIsNot NameLoad NameLoad body Expr Call NameLoad Str Expr Call NameLoad NameLoad Return Call AttributeLoad Str attr NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str Return Call NameLoad Call NameLoad Call NameLoad NameLoad Call NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Assign TupleStore NameStore NameStore NameStore NameStore NameStore NameLoad Assign TupleStore NameStore NameStore NameStore NameStore NameStore NameLoad If CompareEq NameLoad NameLoad body Assign NameStore NameLoad If CompareIsNot NameLoad NameLoad body Assign TupleStore NameStore NameStore NameStore NameStore TupleLoad NameLoad NameLoad Call NameLoad NameLoad NameLoad orelse If CompareIsNot NameLoad NameLoad body Assign TupleStore NameStore NameStore NameStore TupleLoad NameLoad Call NameLoad NameLoad NameLoad orelse If CompareEq NameLoad Str body Assign NameStore NameLoad If CompareIsNot NameLoad NameLoad body Assign NameStore NameLoad orelse Assign NameStore NameLoad orelse If Call AttributeLoad NameLoad attr Str body Assign NameStore Call NameLoad NameLoad orelse Assign NameStore Call NameLoad NameLoad NameLoad NameLoad Assign NameStore Call NameLoad NameLoad Assign NameStore NameLoad Assign NameStore NameLoad Assign NameStore NameLoad Assign NameStore NameLoad Return TupleLoad NameLoad NameLoad NameLoad NameLoad NameLoad decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore ListLoad While NameLoad body If Call AttributeLoad NameLoad attr Str body Assign NameStore SubscriptLoad NameLoad Slice Num Continue If Call AttributeLoad NameLoad attr Str body Assign NameStore SubscriptLoad NameLoad Slice Num Continue If Call AttributeLoad NameLoad attr Str body Assign NameStore SubscriptLoad NameLoad Slice Num Continue If CompareEq NameLoad Str body Assign NameStore Str Continue If Call AttributeLoad NameLoad attr Str body Assign NameStore SubscriptLoad NameLoad Slice Num If NameLoad body Expr Call AttributeLoad NameLoad attr Continue If CompareEq NameLoad Str body Assign NameStore Str If NameLoad body Expr Call AttributeLoad NameLoad attr Continue If CompareEq NameLoad Str body Assign NameStore SubscriptLoad NameLoad Slice Num Continue If CompareEq NameLoad Str body Assign NameStore SubscriptLoad NameLoad Slice Num Continue Assign NameStore Num If Call AttributeLoad NameLoad attr Str body Assign NameStore Num Assign NameStore Call AttributeLoad NameLoad attr Str NameLoad If CompareLt NameLoad Num body Assign NameStore NameLoad Expr Call AttributeLoad NameLoad attr SubscriptLoad NameLoad Slice NameLoad If CompareIs NameLoad NameLoad body Break Assign NameStore SubscriptLoad NameLoad Slice NameLoad Return Call AttributeLoad Str attr NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults body If CompareEq NameLoad Str body Return BinOpAdd Str NameLoad Assign NameStore Call AttributeLoad NameLoad attr Str If CompareGtE NameLoad Num body Return BinOpAdd SubscriptLoad NameLoad Slice BinOpAdd NameLoad Num NameLoad Return NameLoad decorator_list If CompareEq NameLoad Str body Import alias Expr Call AttributeLoad NameLoad attr
N/A N/A RFC 3986 URI parsing and relative reference resolution / absolutization.

(aka splitting and joining)

Copyright 2006 John J. Lee <jjl@pobox.com>

This code is free software; you can redistribute it and/or modify it under
the terms of the BSD or ZPL 2.1 licenses (see the file COPYING.txt
included with the distribution).

 N/A re urllib N/A BAD_URI_CHARS_RE N/A N/A re compile [^A-Za-z0-9\-_.~!*'();:@&=+$,/?%#[\]] clean_url N/A N/A url encoding N/A N/A N/A N/A N/A type url N/A type N/A N/A url N/A N/A url decode encoding replace N/A url N/A N/A url strip N/A N/A N/A urllib quote N/A N/A url encode encoding !*'();:@&=+$,/?%#[]~ N/A is_clean_uri N/A N/A uri N/A N/A N/A 
    >>> is_clean_uri("ABC!")
    True
    >>> is_clean_uri(u"ABC!")
    True
    >>> is_clean_uri("ABC|")
    False
    >>> is_clean_uri(u"ABC|")
    False
    >>> is_clean_uri("http://example.com/0")
    True
    >>> is_clean_uri(u"http://example.com/0")
    True
     N/A N/A N/A bool N/A N/A BAD_URI_CHARS_RE search uri N/A N/A SPLIT_MATCH N/A N/A N/A re compile ^(([^:/?#]+):)?(//([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))? match urlsplit N/A N/A absolute_uri N/A N/A N/A Return scheme, authority, path, query, fragment. N/A match N/A SPLIT_MATCH absolute_uri N/A match N/A N/A g N/A N/A match groups N/A N/A N/A g N/A 1 N/A g N/A 3 N/A g N/A 4 N/A g N/A 6 N/A g N/A 8 N/A urlunsplit N/A N/A parts N/A N/A N/A N/A scheme authority path query fragment parts N/A r N/A N/A append N/A r append N/A N/A scheme None N/A N/A N/A append scheme N/A N/A append : N/A N/A authority None N/A N/A N/A append // N/A N/A append authority N/A N/A append path N/A N/A query None N/A N/A N/A append ? N/A N/A append query N/A N/A fragment None N/A N/A N/A append # N/A N/A append fragment N/A N/A N/A join r N/A urljoin N/A N/A base_uri uri_reference N/A N/A N/A Join a base URI with a URI reference and return the resulting URI.

    See RFC 3986.
     N/A N/A urlunsplit N/A urljoin_parts N/A urlsplit base_uri N/A urlsplit uri_reference N/A urljoin_parts N/A N/A base_parts reference_parts N/A N/A N/A N/A scheme authority path query fragment base_parts N/A N/A rscheme rauthority rpath rquery rfragment reference_parts N/A N/A rscheme scheme N/A N/A rscheme None N/A N/A rscheme None N/A N/A N/A tscheme tauthority tpath tquery N/A rscheme rauthority N/A remove_dot_segments rpath rquery N/A N/A N/A rauthority None N/A N/A N/A tauthority tpath tquery N/A rauthority N/A remove_dot_segments rpath rquery N/A N/A N/A rpath N/A N/A tpath path N/A N/A rquery None N/A N/A tquery rquery N/A N/A tquery query N/A N/A N/A N/A rpath startswith / N/A N/A tpath N/A remove_dot_segments rpath N/A N/A tpath N/A merge authority path rpath N/A tpath N/A remove_dot_segments tpath N/A tquery rquery N/A tauthority authority N/A tscheme scheme N/A tfragment rfragment N/A N/A tscheme tauthority tpath tquery tfragment N/A remove_dot_segments N/A N/A path N/A N/A N/A r N/A N/A path N/A N/A N/A N/A path startswith ../ N/A N/A path N/A path N/A 3 N/A N/A N/A N/A path startswith ./ N/A N/A path N/A path N/A 2 N/A N/A N/A N/A path startswith /./ N/A N/A path N/A path N/A 2 N/A N/A N/A path /. N/A N/A path / N/A N/A N/A N/A path startswith /../ N/A N/A path N/A path N/A 3 N/A r N/A N/A N/A N/A r pop N/A N/A N/A path /.. N/A N/A path / N/A r N/A N/A N/A N/A r pop N/A N/A N/A path . N/A N/A path N/A path N/A 1 N/A N/A N/A path .. N/A N/A path N/A path N/A 2 N/A N/A start 0 N/A N/A N/A path startswith / N/A N/A start 1 N/A ii N/A N/A path find / start N/A N/A ii 0 N/A N/A ii None N/A N/A N/A r append N/A path N/A ii N/A N/A ii None N/A N/A N/A path N/A path N/A ii N/A N/A N/A join r N/A merge N/A N/A base_authority base_path ref_path N/A N/A N/A N/A base_path N/A N/A N/A / ref_path N/A ii N/A N/A base_path rfind / N/A N/A ii 0 N/A N/A N/A N/A base_path N/A N/A ii 1 ref_path N/A ref_path N/A N/A N/A __name__ __main__ N/A N/A doctest N/A N/A N/A doctest testmod