N
νu¦9c       s     k  Z   k  l l l l 	 d  d d d d d d 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 g Z  d  d d d d d d	 g Z  d d d d d d	 g Z	  d  d d d d d d d d d d d d	 g Z
  e  i e  i d Z ! d Z " h  Z $ d   Z / d	 d d  Z r d   Z  d d  Z ° d   Z Ό d Z ί d   Z ύ e d j o ώ e   n d S(   s   ftps   https   gophers   nntps   waiss   files   httpss   shttps   prosperos    s   telnets   snewss   hdls   mailtos   newss   +-.i   c      s   $ % & ' h  a  d S(   s   Clear the parse cache.N(   s   _parse_cache(    s,   /usr/lib/python1.5/site-packages/urlparse.pys   clear_cache$ s   c    s  / 0 |  | | f } 1 t i | t  } 2 | o 3 | Sn 4 t t  t	 j o 5 t
   n 6 t i } 7 d } } } }	 }
 8 | |  d  } 9 | d j o: |  |  d j o€; t i |  |   } < |  | d }  = |  d  d j oY > | |  d d  } ? | d j  o @ t |   } n A |  d | !} B |  | }  n C | oK D t i |  d	  } E | d j o" F |  | d }
 G |  |  }  n n H | |  d
  } I | d j o" J |  | d }	 K |  |  }  n L | |  d  } M | d j o" N |  | d } O |  |  }  n P | | |  | |	 |
 f } Q | t | <R | Sn S xY |  |  d S r } T | t j o U Pn qrWW t i |  |   |  | d f \ } }  n X | t j ot Y |  d  d j o\ Z | |  d d  } [ | d j  o \ t |   } n ] |  d | !|  | f \ } }  n n ^ | o
 | t j oN _ t i |  d	  } ` | d j o% a |  |  |  | d f \ }  }
 n n b | t j oK c | |  d
  } d | d j o% e |  |  |  | d f \ }  }	 n n f | t j oK g | |  d  } h | d j o% i |  |  |  | d f \ }  } n n j | | |  | |	 |
 f } k | t | <l | Sd  S(   Ns    s   :i    s   httpi   i   s   //s   /s   #s   ?s   ;(   s   urls   schemes   allow_fragmentss   keys   _parse_caches   gets   Nones   cacheds   lens   MAX_CACHE_SIZEs   clear_caches   strings   finds   netlocs   paths   paramss   querys   fragments   is   lowers   rfinds   tuples   cs   scheme_charss   uses_netlocs   uses_fragments
   uses_querys   uses_params(   s   urls   schemes   allow_fragmentss   keys   cacheds   finds   netlocs   paths   paramss   querys   fragments   is   tuples   cs,   /usr/lib/python1.5/site-packages/urlparse.pys   urlparse/ sz   

 	.()))i   c    s  r |  \ } } } } } } s | p | t j o | d  d j oA t | d  d j o t d | } n u d | p d | } n v | o w | d | } n x | o y | d | } n z | o { | d | } n | | o } | d	 | } n ~ | Sd  S(
   Ni   s   //i   s   /s    s   :s   ;s   ?s   #(   s   netlocs   schemes   uses_netlocs   urls   paramss   querys   fragment(   s   .0s   schemes   netlocs   urls   paramss   querys   fragments,   /usr/lib/python1.5/site-packages/urlparse.pys
   urlunparser s   ( 



c    sL    |  o  | Sn  t |  d |  \ } } } } } }  t | | |  \ }	 }
 } } } }  |	 | j p
 |	 t j o#  t |	 |
 | | | | f  Sn  |	 t j o:  |
 o#  t |	 |
 | | | | f  Sn  | }
 n  | d  d j o#  t |	 |
 | | | | f  Sn  | o*  t |	 |
 | | | p | | f  Sn  t | d  }  | d j o  | |  d | } n  t | d  }  | d d j o  d | d <n  x%  d | j o  | i d  qΧW x  d o   d } ‘ t |  d } ’ xf ’ | | j  oQ £ | | d j o | | d o € | | d | d 5₯ Pn ¦ | d } q.W¨ PqW© t |  d j o | d d j o | d d j o ͺ d | d <n> « t |  d j o | d d j o ¬ d g | d )n ­ t |	 |
 t | d  | | | f  Sd  S(   Ns    i   s   /i    s   .s   ..i   (   s   bases   urls   urlparses   allow_fragmentss   bschemes   bnetlocs   bpaths   bparamss   bquerys	   bfragments   schemes   netlocs   paths   paramss   querys   fragments   uses_relatives
   urlunparses   uses_netlocs   rfinds   is   splitfieldss   segmentss   removes   lens   ns
   joinfields(   s   bases   urls   allow_fragmentss   bschemes   bnetlocs   bpaths   bparamss   bquerys	   bfragments   schemes   netlocs   paths   paramss   querys   fragments   is   segmentss   ns,   /usr/lib/python1.5/site-packages/urlparse.pys   urljoin sN   ''#
##*  
	 #	8(c    sY   ° Ά · t  |   \ } } } } } } Έ t | | | | | d f  } Ή | | 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    N(
   s   urlparses   urls   ss   ns   ps   as   qs   frags
   urlunparses   defrag(   s   urls   ss   ns   ps   as   qs   frags   defrags,   /usr/lib/python1.5/site-packages/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΄  ί ΰ k  }  α d } β |  i d oC γ |  i d } δ | d j o ε |  i } n η t |  } n ι k } κ | i t  } λ x&λ d oμ | i	   } ν | o ν Pn ξ t 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   strings   splits   wordss   urls   urlparses   partss   urljoins   abss   wrappeds   len(   s   syss   bases   fns   fps   StringIOs   lines   wordss   urls   partss   abss   wrappeds,   /usr/lib/python1.5/site-packages/urlparse.pys   testί s8   			 
 
's   __main__N(   s   strings
   joinfieldss   splitfieldss   finds   rfinds   uses_relatives   uses_netlocs   non_hierarchicals   uses_paramss
   uses_querys   uses_fragments   letterss   digitss   scheme_charss   MAX_CACHE_SIZEs   _parse_caches   clear_caches   urlparses
   urlunparses   urljoins	   urldefrags
   test_inputs   tests   __name__(    s,   /usr/lib/python1.5/site-packages/urlparse.pys   ? s&   '-0		C.	#