-í
”‚É<c       sÛ    d  Z    d d d g Z 
 d d d d d d	 d
 d d d d d g Z  d d d d d d d	 d
 d d d d d d g Z  d d d d d d d d g Z  d d d d d
 d d d d d g
 Z  d d d
 d d d d d d g	 Z  d d d d d d d d
 d d d	 d d g Z   d Z % d Z	 & h  a
 ( d „  Z . d d d „ Z < d „  Z E d d d „ Z w d „  Z € d „  Z Œ d d „ Z À d  „  Z Ï d! Z ò d" „  Z e d# j o e ƒ  n d$ S(%   s   Parse (absolute and relative) URLs.

See RFC 1808: "Relative Uniform Resource Locators", by R. Fielding,
UC Irvine, June 1995.
s   urlparses
   urlunparses   urljoins   ftps   https   gophers   nntps   waiss   files   httpss   shttps   prosperos   rtsps   rtspus    s   telnets   snewss   hdls   mailtos   newss   sipsA   abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+-.i   c      s   ( ) * + h  a  d S(   s   Clear the parse cache.N(   s   _parse_cache(    (    (    s(   /usr/local/twc/lib/python2.2/urlparse.pys   clear_cache( s   i   c    s   . 3 4 t  |  | | ƒ } 5 | \ } } }  } } 6 | t j o
 d |  j o 7 t	 |  ƒ \ }  } n
 9 d } : | | |  | | | f Sd S(   s#  Parse a URL into 6 components:
    <scheme>://<netloc>/<path>;<params>?<query>#<fragment>
    Return a 6-tuple: (scheme, netloc, path, params, query, fragment).
    Note that we don't break the components up in smaller bits
    (e.g. netloc is a single string) and we don't expand % escapes.s   ;s    N(   s   urlsplits   urls   schemes   allow_fragmentss   tuples   netlocs   querys   fragments   uses_paramss   _splitparamss   params(   s   urls   schemes   allow_fragmentss   tuples   fragments   netlocs   paramss   query(    (    s(   /usr/local/twc/lib/python2.2/urlparse.pys   urlparse. s   	c    s…   < = d |  j oC > |  i d |  i d ƒ ƒ } ? | d j  o @ |  d f Sn n B |  i d ƒ } C |  |  |  | d f Sd  S(   Ns   /s   ;i    s    i   (   s   urls   finds   rfinds   i(   s   urls   i(    (    s(   /usr/local/twc/lib/python2.2/urlparse.pys   _splitparams< s   c    sd  E J K |  | | f }	 L t i |	 t ƒ } M | o N | Sn O t t ƒ t	 j o P t
 ƒ  n Q d } }
 } R |  i d ƒ } S | d j o˜T |  |  d j o&U |  |  i ƒ  } V |  | d }  W |  d  d j oY X |  i d d ƒ } Y | d j  o Z t |  ƒ } n [ |  d | !} \ |  | }  n ] | o
 d	 |  j o ^ |  i d	 d ƒ \ }  } n _ d
 |  j o ` |  i d
 d ƒ \ }  }
 n a | | |  |
 | f } b | t |	 <c | Sn d xT |  |  Dd ] } e | t j o f Pn qáWh |  |  i ƒ  |  | d f \ } }  n i | t j ot j |  d  d j o\ k |  i d d ƒ } l | d j  o m t |  ƒ } n n |  d | !|  | f \ } }  n n o | o | t j o
 d	 |  j o p |  i d	 d ƒ \ }  } n q | t j o
 d
 |  j o r |  i d
 d ƒ \ }  }
 n s | | |  |
 | f } t | t |	 <u | Sd S(   s  Parse a URL into 5 components:
    <scheme>://<netloc>/<path>?<query>#<fragment>
    Return a 5-tuple: (scheme, netloc, path, query, fragment).
    Note that we don't break the components up in smaller bits
    (e.g. netloc is a single string) and we don't expand % escapes.s    s   :i    s   httpi   i   s   //s   /s   #s   ?N(   s   urls   schemes   allow_fragmentss   keys   _parse_caches   gets   Nones   cacheds   lens   MAX_CACHE_SIZEs   clear_caches   netlocs   querys   fragments   finds   is   lowers   splits   tuples   cs   scheme_charss   uses_netlocs   uses_fragments
   uses_query(   s   urls   schemes   allow_fragmentss   is   cacheds   cs   netlocs   fragments   tuples   keys   query(    (    s(   /usr/local/twc/lib/python2.2/urlparse.pys   urlsplitE sX   
 	+($c    s_   w |  \ } } } } } } { | | o } d | | f } n ~ t | | | | | f ƒ Sd S(   sú   Put a parsed URL back together again.  This may result in a
    slightly different, but equivalent URL, if the URL that was parsed
    originally had redundant delimiters, e.g. a ? with an empty query
    (the draft states that these are equivalent).s   %s;%sN(   s   schemes   netlocs   urls   paramss   querys   fragments
   urlunsplit(   s   .0s   schemes   netlocs   urls   paramss   querys   fragment(    (    s(   /usr/local/twc/lib/python2.2/urlparse.pys
   urlunparsew s   
c    sð   € |  \ } } } } }  | p | t j o | d  d j oH ‚ | o | d  d j o ‚ d | } n ƒ d | p d | } n „ | o … | d | } n † | o ‡ | d | } n ˆ | o ‰ | d | } n Š | Sd  S(	   Ni   s   //i   s   /s    s   :s   ?s   #(   s   schemes   netlocs   urls   querys   fragments   uses_netloc(   s   .0s   schemes   netlocs   urls   querys   fragment(    (    s(   /usr/local/twc/lib/python2.2/urlparse.pys
   urlunsplit€ s   ( 


c    s1  Œ Ž  |  o  | Sn ‘ | o ’ |  Sn “ t |  d | ƒ \ } }
 } } } } • t | | | ƒ \ }	 } } } } } — |	 | j p
 |	 t j o ˜ | Sn ™ |	 t j o: š | o# › t |	 | | | | | f ƒ Sn  |
 } n ž | d  d j o# Ÿ t |	 | | | | | f ƒ Sn ¡ | oS ¢ | o% £ | } ¤ | o ¥ | } n n ¦ t |	 | | | | | f ƒ Sn ¨ | i d ƒ d  | i d ƒ } ª | d d j o « d | d <n ¬ x% ¬ d | j o ­ | i d ƒ qÕW® x£ ® d o˜ ¯ d } ° t | ƒ d } ± xr ± | | j  o] ² | | d j o | | d d d f j o ´ | | d | d 5µ Pn ¶ | d } q,W¸ Pq W¹ | d d g j o º d | d <n< » t | ƒ d j o | d d j o ¼ d g | d )n ½ t |	 | d i | ƒ | | | f ƒ Sd	 S(
   sa   Join a base URL and a possibly relative URL to form an absolute
    interpretation of the latter.s    i   s   /iÿÿÿÿs   .s   ..i   iþÿÿÿN(   s   bases   urls   urlparses   allow_fragmentss   bschemes   bnetlocs   bpaths   bparamss   bquerys	   bfragments   schemes   netlocs   paths   paramss   querys   fragments   uses_relatives   uses_netlocs
   urlunparses   splits   segmentss   removes   is   lens   ns   join(   s   bases   urls   allow_fragmentss   bparamss   fragments   netlocs   bschemes   querys   bpaths   schemes   bnetlocs   is   segmentss   ns   paramss   bquerys   paths	   bfragment(    (    s(   /usr/local/twc/lib/python2.2/urlparse.pys   urljoinŒ sV   ''
##	##  
	 /	'c    sz   À Æ Ç d |  j oS È t |  ƒ \ } } } } } } É t | | | | | d f ƒ } Ê | | f Sn Ì |  d f Sd S(   s¿   Removes any existing fragment from URL.

    Returns a tuple of the defragmented URL and the fragment.  If
    the URL contained no fragments, the second element is the
    empty string.
    s   #s    N(
   s   urls   urlparses   ss   ns   ps   as   qs   frags
   urlunparses   defrag(   s   urls   qs   ps   ss   defrags   frags   as   n(    (    s(   /usr/local/twc/lib/python2.2/urlparse.pys	   urldefragÀ s   !!s™  
      http://a/b/c/d

      g:h        = <URL:g:h>
      http:g     = <URL:http://a/b/c/g>
      http:      = <URL:http://a/b/c/d>
      g          = <URL:http://a/b/c/g>
      ./g        = <URL:http://a/b/c/g>
      g/         = <URL:http://a/b/c/g/>
      /g         = <URL:http://a/g>
      //g        = <URL:http://g>
      ?y         = <URL:http://a/b/c/d?y>
      g?y        = <URL:http://a/b/c/g?y>
      g?y/./x    = <URL:http://a/b/c/g?y/./x>
      .          = <URL:http://a/b/c/>
      ./         = <URL:http://a/b/c/>
      ..         = <URL:http://a/b/>
      ../        = <URL:http://a/b/>
      ../g       = <URL:http://a/b/g>
      ../..      = <URL:http://a/>
      ../../g    = <URL:http://a/g>
      ../../../g = <URL:http://a/../g>
      ./../g     = <URL:http://a/b/g>
      ./g/.      = <URL:http://a/b/c/g/>
      /./g       = <URL:http://a/./g>
      g/./h      = <URL:http://a/b/c/g/h>
      g/../h     = <URL:http://a/b/c/h>
      http:g     = <URL:http://a/b/c/g>
      http:      = <URL:http://a/b/c/d>
      http:?y         = <URL:http://a/b/c/d?y>
      http:g?y        = <URL:http://a/b/c/g?y>
      http:g?y/./x    = <URL:http://a/b/c/g?y/./x>
c     s·  ò ó d  k  } ô d } õ | i d oC ö | i d }
 ÷ |
 d j o ø | i }  n ú t |
 ƒ }  n ü d  k } ý | i t ƒ }  þ x#þ d oÿ |  i	 ƒ  }	  |	 o  Pn |	 i ƒ  } | o
 q n | d } t | ƒ } d | | f GHt | | ƒ } | o 	| } n 
d | } d | | f GHt | ƒ d j o | d d	 j o0 | | d
 j o d G| d
 Gd GHn n q Wd  S(   Ns    i   s   -i    s
   %-10s : %ss   <URL:%s>s
   %-10s = %si   s   =i   s   EXPECTEDs
   !!!!!!!!!!(   s   syss   bases   argvs   fns   stdins   fps   opens   StringIOs
   test_inputs   readlines   lines   splits   wordss   urls   urlparses   partss   urljoins   abss   wrappeds   len(   s   fps   abss   StringIOs   urls   partss   syss   bases   wordss   wrappeds   lines   fn(    (    s(   /usr/local/twc/lib/python2.2/urlparse.pys   testò s8   	 
 
's   __main__N(   s   __doc__s   __all__s   uses_relatives   uses_netlocs   non_hierarchicals   uses_paramss
   uses_querys   uses_fragments   scheme_charss   MAX_CACHE_SIZEs   _parse_caches   clear_caches   urlparses   _splitparamss   urlsplits
   urlunparses
   urlunsplits   urljoins	   urldefrags
   test_inputs   tests   __name__(   s   urljoins
   urlunsplits   uses_paramss	   urldefrags   urlsplits   __all__s   clear_caches   non_hierarchicals   MAX_CACHE_SIZEs   urlparses
   test_inputs
   uses_querys   _splitparamss   tests   uses_netlocs   uses_relatives   scheme_charss
   urlunparses   uses_fragment(    (    s(   /usr/local/twc/lib/python2.2/urlparse.pys   ? s,   -3!'$0				2	4	#