‡Æ
ðÞ?:c    	   s,  d  Z  d k Z d k Z d k Z d k Z d Z d Z e i d j o d k l	 Z	 l
 Z
 n: e i d j o d k l	 Z	 l
 Z
 n d „  Z	 d „  Z
 e Z e d	 „ Z e e e d
 „ Z d „  Z h  Z d f  d „  ƒ  YZ d e f d „  ƒ  YZ e Z d „  Z e Z d „  Z e Z d „  Z e Z d „  Z d f  d „  ƒ  YZ d f  d „  ƒ  YZ d e f d „  ƒ  YZ d e f d „  ƒ  YZ d e f d „  ƒ  YZ  d „  Z! d „  Z" e Z# d  „  Z$ e Z% d! „  Z& e Z' d" „  Z( e Z) d# „  Z* e Z+ d$ „  Z, e Z- d& d% „ Z. e Z/ d' „  Z0 e Z1 d( „  Z2 d) „  Z3 e Z4 d* „  Z5 d+ „  Z6 d, „  Z7 d- „  Z8 d. Z9 e9 d/ Z: e Z; d0 „  Z< d/ d1 „ Z= d3 d2 „ Z> d4 „  Z? d5 „  Z@ e i d j o d6 „  ZA n- e i d j o d7 „  ZB d8 „  ZA n e@ ZA d9 „  ZC d: „  ZD g  d; „ ZE d< „  ZF eG d= j o eF ƒ  n d S(>   s»  Open an arbitrary URL.

See the following document for more info on URLs:
"Names and Addresses, URIs, URLs, URNs, URCs", at
http://www.w3.org/pub/WWW/Addressing/Overview.html

See also the HTTP spec (from which the error codes are derived):
"HTTP - Hypertext Transfer Protocol", at
http://www.w3.org/pub/WWW/Protocols/

Related standards and specs:
- RFC1808: the "relative URL" spec. (authoritative status)
- RFC1738 - the "URL standard". (authoritative status)
- RFC1630 - the "URI spec". (informational status)

The object returned by URLopener().open(file) will differ per
protocol.  All you know is that is has methods read(), readline(),
readlines(), fileno(), close() and info().  The read*(), fileno()
and close() methods work like those of open files.
The info() method returns a mimetools.Message object which can be
used to query various info about the object, if available.
(mimetools.Message objects are queried with the getheader() method.)
Ns   1.13i
   s   mac(   s   url2pathnames   pathname2urls   ntc    s   t  |  ƒ Sd  S(   N(   s   unquotes   pathname(   s   pathnames5   /home/guest/edwardam/cmp2/py2/lib/python2.0/urllib.pys   url2pathname) s    c    s   t  |  ƒ Sd  S(   N(   s   quotes   pathname(   s   pathnames5   /home/guest/edwardam/cmp2/py2/lib/python2.0/urllib.pys   pathname2url+ s    c    sG   t  o t ƒ  a  n | t j o t  i |  ƒ Sn t  i |  | ƒ Sd S(   s.   urlopen(url [, data]) -> open file-like objectN(   s
   _urlopeners   FancyURLopeners   datas   Nones   opens   url(   s   urls   datas5   /home/guest/edwardam/cmp2/py2/lib/python2.0/urllib.pys   urlopen7 s      c    s/   t  o t ƒ  a  n t  i |  | | | ƒ Sd  S(   N(   s
   _urlopeners   FancyURLopeners   retrieves   urls   filenames
   reporthooks   data(   s   urls   filenames
   reporthooks   datas5   /home/guest/edwardam/cmp2/py2/lib/python2.0/urllib.pys   urlretrieve@ s     c      s   t  o t  i ƒ  n d  S(   N(   s
   _urlopeners   cleanup(    s5   /home/guest/edwardam/cmp2/py2/lib/python2.0/urllib.pys
   urlcleanupE s    s	   URLopenerc      sï   d  Z  e Z d e Z e d „ Z d „  Z d „  Z d „  Z d „  Z	 e d „ Z
 e d „ Z e d	 „ Z e e e d
 „ Z e d „ Z e d „ Z d „  Z e e d ƒ o e d „ Z n d „  Z d „  Z d „  Z d „  Z e d „ Z RS(   s,  Class to open URLs.
    This is a class rather than just a subroutine because we may need
    more than one set of global protocol-specific options.
    Note -- this is a base class for those who don't want the
    automatic handling of errors type 302 (relocated) and 401
    (authorization needed).s   Python-urllib/%sc    s‡   | t j o t ƒ  } n | |  _  | i d ƒ |  _ | i d ƒ |  _ d |  i f g |  _	 g  |  _
 t i |  _ t |  _ t |  _ d  S(   Ns   key_files	   cert_files
   User-agent(   s   proxiess   Nones
   getproxiess   selfs   x509s   gets   key_files	   cert_files   versions
   addheaderss   _URLopener__tempfiless   oss   unlinks   _URLopener__unlinks	   tempcaches   ftpcache(   s   selfs   proxiess   x509s5   /home/guest/edwardam/cmp2/py2/lib/python2.0/urllib.pys   __init__X s     			c    s   |  i ƒ  d  S(   N(   s   selfs   close(   s   selfs5   /home/guest/edwardam/cmp2/py2/lib/python2.0/urllib.pys   __del__o s    c    s   |  i ƒ  d  S(   N(   s   selfs   cleanup(   s   selfs5   /home/guest/edwardam/cmp2/py2/lib/python2.0/urllib.pys   closer s    c    se   |  i o< x. |  i d r! } y |  i | ƒ Wn n Xq W|  i 2n |  i o |  i i ƒ  n d  S(   Ni    (   s   selfs   _URLopener__tempfiless   files   _URLopener__unlinks	   tempcaches   clear(   s   selfs   files5   /home/guest/edwardam/cmp2/py2/lib/python2.0/urllib.pys   cleanupu s    
 
c    s   |  i i | ƒ d S(   sd   Add a header to be used by the HTTP interface only
        e.g. u.addheader('Accept', 'sound/basic')N(   s   selfs
   addheaderss   appends   args(   s   selfs   argss5   /home/guest/edwardam/cmp2/py2/lib/python2.0/urllib.pys	   addheaderƒ s     c    sÛ  t  | ƒ } |  i o |  i i | ƒ o6 |  i | \ } } t | d ƒ } t	 | | | ƒ Sn t
 | ƒ \ } } | o
 d } n |  i i | ƒ oA |  i | } t
 | ƒ \ } }	 t |	 ƒ \ }
 } |
 | f } n t } d | } | |  _ d | j o" t i t i | d ƒ d ƒ } n t |  | ƒ o2 | o |  i | | | ƒ Sn |  i | | ƒ Sn y> | t j o t |  | ƒ | ƒ Sn t |  | ƒ | | ƒ SWn4 t i j
 o% } t  d | f t! i" ƒ  d ‚ n Xd S(	   s6   Use URLopener().open(file) instead of open(file, 'r').s   rbs   files   open_s   -s   _s   socket errori   N(#   s   unwraps   fullurls   selfs	   tempcaches   has_keys   filenames   headerss   opens   fps
   addinfourls	   splittypes   types   urls   proxiess   proxys	   proxyhosts	   splithosts   hosts   selectors   Nones   names   strings   joins   splits   hasattrs   open_unknown_proxys   datas   open_unknowns   getattrs   sockets   errors   msgs   IOErrors   syss   exc_info(   s   selfs   fullurls   datas   filenames   headerss   fps   types   urls   proxys	   proxyhosts   hosts   selectors   names   msgs5   /home/guest/edwardam/cmp2/py2/lib/python2.0/urllib.pys   open‰ s:     

	"c    s(   t  | ƒ \ } } t d d | f ‚ d S(   s/   Overridable interface to open unknown URL type.s	   url errors   unknown url typeN(   s	   splittypes   fullurls   types   urls   IOError(   s   selfs   fullurls   datas   types   urls5   /home/guest/edwardam/cmp2/py2/lib/python2.0/urllib.pys   open_unknown¬ s     c    s,   t  | ƒ \ } } t d d | | f ‚ d S(   s/   Overridable interface to open unknown URL type.s	   url errors   invalid proxy for %sN(   s	   splittypes   fullurls   types   urls   IOErrors   proxy(   s   selfs   proxys   fullurls   datas   types   urls5   /home/guest/edwardam/cmp2/py2/lib/python2.0/urllib.pys   open_unknown_proxy± s     c    s²  t  | ƒ } |  i o |  i i | ƒ o |  i | Sn t | ƒ \ } } | o | p
 | d j oX y< |  i	 | ƒ } | i ƒ  } ~ t t | ƒ d ƒ | f SWn t j
 o	 }	 n Xn |  i | | ƒ } | i ƒ  }
 | oŸ d k } t | ƒ \ } } t | p d ƒ \ } } t | p d ƒ \ } } t | p d ƒ \ } } t i i | ƒ d } | i | ƒ } |  i i | ƒ n | |
 f } |  i t  j	 o | |  i | <n t | d ƒ } d d } d } d } | o8 |
 i d ƒ o t& |
 d	 ƒ } n | d
 | | ƒ n | i' | ƒ } | o | d | | ƒ n xM | oE | i) | ƒ | i' | ƒ } | d } | o | | | | ƒ n qCW| i* ƒ  | i* ƒ  ~ ~ | Sd S(   sq   retrieve(url) returns (filename, None) for a local object
        or (tempfilename, headers) for a remote object.s   filei   Ns    s   wbi   i   s   content-lengths   Content-Lengthi    (+   s   unwraps   urls   selfs	   tempcaches   has_keys	   splittypes   types   url1s   filenames   open_local_files   fps   infos   hdrss   url2pathnames	   splithosts   IOErrors   msgs   opens   datas   headerss   tempfiles   garbages   paths
   splitquerys	   splitattrs   oss   splitexts   suffixs   mktemps   _URLopener__tempfiless   appends   results   Nones   tfps   bss   sizes   blocknums
   reporthooks   ints   reads   blocks   writes   close(   s   selfs   urls   filenames
   reporthooks   datas   types   url1s   fps   hdrss   msgs   headerss   tempfiles   garbages   paths   suffixs   results   tfps   bss   sizes   blocknums   blocks5   /home/guest/edwardam/cmp2/py2/lib/python2.0/urllib.pys   retrieve· sd     		
 


c    s×  d k  } t } t | ƒ t d ƒ j oE t | ƒ \ } } | o" t | ƒ \ } } t	 | ƒ } n | } n˜ | \ } } t | ƒ \ } }	 |	 } t } t i | ƒ d j o
 t } nN t |	 ƒ \ } }	 | o t | ƒ \ } } n | o d | | |	 f } n | o t d d f ‚ n | o% d k }
 t i |
 i | ƒ ƒ } n t } | i | ƒ } | t j	 o> | i d | ƒ | i d d	 ƒ | i d
 d t | ƒ ƒ n | i d | ƒ | o | i d d | ƒ n | o | i d | ƒ n x# |  i d r } t | i | ƒ qW| i ƒ  | t j	 o | i  | d ƒ n | i! ƒ  \ } } } | i% ƒ  } | d j o t' | | d | ƒ SnG | t j o |  i( | | | | | ƒ Sn |  i( | | | | | | ƒ Sd S(   s   Use HTTP protocol.Ns    s   https	   %s://%s%ss
   http errors   no host givens   POSTs   Content-types!   application/x-www-form-urlencodeds   Content-lengths   %ds   GETs   Authorizations   Basic %ss   Hosti    s   
iÈ   s   http:()   s   httplibs   Nones   user_passwds   types   urls	   splithosts   hosts   selectors	   splitusers   unquotes   realhosts	   splittypes   urltypes   rests   strings   lowers   IOErrors   base64s   strips   encodestrings   auths   HTTPs   hs   datas
   putrequests	   putheaders   lens   selfs
   addheaderss   argss   applys
   endheaderss   sends   getreplys   errcodes   errmsgs   headerss   getfiles   fps
   addinfourls
   http_error(   s   selfs   urls   datas   httplibs   user_passwds   hosts   selectors   realhosts   urltypes   rests   base64s   auths   hs   argss   errcodes   errmsgs   headerss   fps5   /home/guest/edwardam/cmp2/py2/lib/python2.0/urllib.pys	   open_httpí sb     	

 	    
c 
   s   d | } t |  | ƒ of t |  | ƒ } | t j o | | | | | | ƒ }	 n | | | | | | | ƒ }	 |	 o |	 Sn n |  i | | | | | ƒ Sd S(   s›   Handle http errors.
        Derived class can override this, or provide specific handlers
        named http_error_DDD where DDD is the 3-digit error code.s   http_error_%dN(   s   errcodes   names   hasattrs   selfs   getattrs   methods   datas   Nones   urls   fps   errmsgs   headerss   results   http_error_default(
   s   selfs   urls   fps   errcodes   errmsgs   headerss   datas   names   methods   results5   /home/guest/edwardam/cmp2/py2/lib/python2.0/urllib.pys
   http_error"s     
 c    s/   | i ƒ  } | i ƒ  t d | | | f ‚ d S(   s>   Default error handler: close the connection and raise IOError.s
   http errorN(   s   fps   reads   voids   closes   IOErrors   errcodes   errmsgs   headers(   s   selfs   urls   fps   errcodes   errmsgs   headerss   voids5   /home/guest/edwardam/cmp2/py2/lib/python2.0/urllib.pys   http_error_default1s     
s   sslc    så  d k  } t } t | ƒ t d ƒ j oE t | ƒ \ } } | o" t | ƒ \ } } t	 | ƒ } n | } n˜ | \ } } t | ƒ \ } }	 |	 } t } t i | ƒ d j o
 t } nN t |	 ƒ \ } }	 | o t | ƒ \ } } n | o d | | |	 f } n | o t d d f ‚ n | o% d k }
 t i |
 i | ƒ ƒ } n t } | i | d d |  i d	 |  i ƒ} | t j	 o> | i d
 | ƒ | i d d ƒ | i d d t | ƒ ƒ n | i d | ƒ | o | i d | ƒ n | o | i d | ƒ n x# |  i d r } t  | i | ƒ qW| i! ƒ  | t j	 o | i" | d ƒ n | i# ƒ  \ } } } | i' ƒ  } | d j o t) | | | ƒ SnG | t j o |  i* | | | | | ƒ Sn |  i* | | | | | | ƒ Sd S(   s   Use HTTPS protocol.Ns    s   httpss	   %s://%s%ss   https errors   no host giveni    s   key_files	   cert_files   POSTs   Content-types!   application/x-www-form-urlencodeds   Content-lengths   %ds   GETs   Authorization: Basic %ss   Hosts   
iÈ   (+   s   httplibs   Nones   user_passwds   types   urls	   splithosts   hosts   selectors	   splitusers   unquotes   realhosts	   splittypes   urltypes   rests   strings   lowers   IOErrors   base64s   strips   encodestrings   auths   HTTPSs   selfs   key_files	   cert_files   hs   datas
   putrequests	   putheaders   lens
   addheaderss   argss   applys
   endheaderss   sends   getreplys   errcodes   errmsgs   headerss   getfiles   fps
   addinfourls
   http_error(   s   selfs   urls   datas   httplibs   user_passwds   hosts   selectors   realhosts   urltypes   rests   base64s   auths   hs   argss   errcodes   errmsgs   headerss   fps5   /home/guest/edwardam/cmp2/py2/lib/python2.0/urllib.pys
   open_https8sh     	

 			    
c    sË   d k  } t | ƒ \ } } | o t d d f ‚ n t | ƒ } t | ƒ \ } } t	 | ƒ \ } } t | ƒ } | o% t | ƒ } | i | | | ƒ } n | i | | ƒ } t | t ƒ  d | ƒ Sd S(   s   Use Gopher protocol.Ns   gopher errors   no host givens   gopher:(   s	   gopherlibs	   splithosts   urls   hosts   selectors   IOErrors   unquotes   splitgophertypes   types
   splitquerys   querys
   send_querys   fps   send_selectors
   addinfourls	   noheaders(   s   selfs   urls	   gopherlibs   hosts   selectors   types   querys   fps5   /home/guest/edwardam/cmp2/py2/lib/python2.0/urllib.pys   open_gopherps     	 c    sG   | d  d j o | d d !d j o |  i | ƒ Sn |  i | ƒ Sd S(   s/   Use local file or FTP depending on form of URL.i   s   //i   s   /N(   s   urls   selfs   open_ftps   open_local_file(   s   selfs   urls5   /home/guest/edwardam/cmp2/py2/lib/python2.0/urllib.pys	   open_file€s     %c    sJ  d k  } d k } d k } | i | ƒ d } | i | i d | p d ƒ ƒ } t | ƒ \ } } | oH | }	 | d  d j o d | }	 n t t t | ƒ d ƒ | |	 ƒ Sn t | ƒ \ } }
 |
 o t i | ƒ t ƒ  t ƒ  f j oH | }	 | d  d j o d | }	 n t t t | ƒ d ƒ | |	 ƒ Sn t d	 d
 f ‚ d S(   s   Use local file.Ni    s   Content-Type: %s
s
   text/plaini   s   /s   file://s   rbs   local file errors   not on local host(   s	   mimetypess	   mimetoolss   StringIOs
   guess_types   urls   mtypes   Messages   headerss	   splithosts   hosts   files   urlfiles
   addinfourls   opens   url2pathnames	   splitports   ports   sockets   gethostbynames	   localhosts   thishosts   IOError(   s   selfs   urls	   mimetypess	   mimetoolss   StringIOs   mtypes   headerss   hosts   files   urlfiles   ports5   /home/guest/edwardam/cmp2/py2/lib/python2.0/urllib.pys   open_local_file‡s&     #*c  	  sv  t  | ƒ \ } } | o t d d f ‚ n t | ƒ \ } } t | ƒ \ } } | o t	 | ƒ \ } } n t } t | ƒ } t | p d ƒ } t | p d ƒ } t i | ƒ } | o d k } | i } n t | ƒ } t | ƒ \ } } t | ƒ } t i | d ƒ }	 |	 d  |	 d f \ }	 }
 |	 o	 |	 d o |	 d }	 n |	 o	 |	 d o d |	 d <n | | | t i |	 d ƒ f } t |  i ƒ t j oR xK |  i i ƒ  d r8 } | | j o% |  i | } |  i | =| i! ƒ  n q³Wn yH|  i i" | ƒ o# t# | | | | |	 ƒ |  i | <n |
 o
 d } n d	 } xj | d r` } t& | ƒ \ } } t i( | ƒ d
 j o | d d d d	 d d f j o t i) | ƒ } n qNW|  i | i* |
 | ƒ \ } } | t j	 o
 | d j o2 d k- } d k. } | i/ | i. d | ƒ ƒ } n
 t1 ƒ  } t2 | | d | ƒ SWn4 t3 ƒ  j
 o% } t d | f t5 i6 ƒ  d ‚ n Xd S(   s   Use FTP protocol.s	   ftp errors   no host givens    Ns   /i   i    s   Ds   Is   types   as   As   is   ds   Content-Length: %d
s   ftp:i   (7   s	   splithosts   urls   hosts   paths   IOErrors	   splitports   ports	   splitusers   users   splitpasswds   passwds   Nones   unquotes   sockets   gethostbynames   ftplibs   FTP_PORTs   ints	   splitattrs   attrss   strings   splitfieldss   dirss   files   joins   keys   lens   selfs   ftpcaches   MAXFTPCACHEs   keyss   ks   vs   closes   has_keys
   ftpwrappers   types   attrs
   splitvalues   values   lowers   uppers   retrfiles   fps   retrlens	   mimetoolss   StringIOs   Messages   headerss	   noheaderss
   addinfourls	   ftperrorss   msgs   syss   exc_info(   s   selfs   urls   hosts   paths   ports   users   passwds   ftplibs   attrss   dirss   files   keys   ks   vs   types   attrs   values   fps   retrlens	   mimetoolss   StringIOs   headerss   msgs5   /home/guest/edwardam/cmp2/py2/lib/python2.0/urllib.pys   open_ftpžsh       	   
# 
	 5 	c    s¼  d k  } d k } d k } y t i | d d ƒ \ } } Wn" t j
 o t	 d d f ‚ n X| o
 d } n t i
 | d ƒ } | d j o d	 | | j o | | d } | |  } n d
 } g  }	 |	 i d | i d | i | i ƒ  ƒ ƒ ƒ |	 i d | ƒ | d j o d k }
 |
 i | ƒ } n t | ƒ } |	 i d t | ƒ ƒ |	 i d
 ƒ |	 i | ƒ t i |	 d ƒ }	 | i  |	 ƒ } | i | d ƒ } t | _ t | | | ƒ Sd S(   s   Use "data" URL.Ns   ,i   s
   data errors   bad data URLs   text/plain;charset=US-ASCIIs   ;i    s   =s    s   Date: %ss   %a, %d %b %Y %T GMTs   Content-type: %ss   base64s   Content-length: %ds   
(   s   StringIOs	   mimetoolss   times   strings   splits   urls   types   datas
   ValueErrors   IOErrors   rfinds   semis   encodings   msgs   appends   strftimes   gmtimes   base64s   decodestrings   unquotes   lens   joins   fs   Messages   headerss   Nones   filenos
   addinfourl(   s   selfs   urls   datas   StringIOs	   mimetoolss   times   types   semis   encodings   msgs   base64s   fs   headerss5   /home/guest/edwardam/cmp2/py2/lib/python2.0/urllib.pys	   open_dataÔs:     
		(   s   __doc__s   Nones   _URLopener__tempfiless   __version__s   versions   __init__s   __del__s   closes   cleanups	   addheaders   opens   open_unknowns   open_unknown_proxys   retrieves	   open_https
   http_errors   http_error_defaults   hasattrs   sockets
   open_httpss   open_gophers	   open_files   open_local_files   open_ftps	   open_data(    s5   /home/guest/edwardam/cmp2/py2/lib/python2.0/urllib.pys	   URLopenerK s,    
				#65	8				6s   FancyURLopenerc      sk   d  Z  d „  Z d „  Z e d „ Z e d „ Z e d „ Z e d „ Z e d „ Z d	 d „ Z	 d
 „  Z
 RS(   s?   Derived class with handlers for errors we can handle (perhaps).c    s$   t  t i |  f | ƒ h  |  _ d  S(   N(   s   applys	   URLopeners   __init__s   selfs   argss
   auth_cache(   s   selfs   argss5   /home/guest/edwardam/cmp2/py2/lib/python2.0/urllib.pys   __init__ s    c    s   t  | | d | ƒ Sd S(   s3   Default error handling -- don't raise an exception.s   http:N(   s
   addinfourls   fps   headerss   url(   s   selfs   urls   fps   errcodes   errmsgs   headerss5   /home/guest/edwardam/cmp2/py2/lib/python2.0/urllib.pys   http_error_defaults     c 	   s›   | i d ƒ o | d } n# | i d ƒ o | d } n d S| i ƒ  } | i ƒ  t d | | ƒ } | t
 j o |  i | ƒ Sn |  i | | ƒ Sd S(   s%   Error 302 -- relocated (temporarily).s   locations   uriNs   http:(   s   headerss   has_keys   newurls   fps   reads   voids   closes   basejoins   urls   datas   Nones   selfs   open(	   s   selfs   urls   fps   errcodes   errmsgs   headerss   datas   newurls   voids5   /home/guest/edwardam/cmp2/py2/lib/python2.0/urllib.pys   http_error_302s     
c    s    |  i | | | | | | ƒ Sd S(   s*   Error 301 -- also relocated (permanently).N(   s   selfs   http_error_302s   urls   fps   errcodes   errmsgs   headerss   data(   s   selfs   urls   fps   errcodes   errmsgs   headerss   datas5   /home/guest/edwardam/cmp2/py2/lib/python2.0/urllib.pys   http_error_301s     c    sÅ   | i d ƒ o± | d } d k } | i d | ƒ }	 |	 o |	 i ƒ  \ }
 } t i	 |
 ƒ d j oU d |  i d } | t j o t |  | ƒ | | ƒ Sn t |  | ƒ | | | ƒ Sn n n d S(   s½   Error 401 -- authentication required.
        See this URL for a description of the basic authentication scheme:
        http://www.ics.uci.edu/pub/ietf/http/draft-ietf-http-v10-spec-00.txts   www-authenticateNs!   [ 	]*([^ 	]+)[ 	]+realm="([^"]*)"s   basics   retry_s   _basic_auth(   s   headerss   has_keys   stuffs   res   matchs   groupss   schemes   realms   strings   lowers   selfs   types   names   datas   Nones   getattrs   url(   s   selfs   urls   fps   errcodes   errmsgs   headerss   datas   stuffs   res   matchs   schemes   realms   names5   /home/guest/edwardam/cmp2/py2/lib/python2.0/urllib.pys   http_error_401s     
	c 
   sº   t  | ƒ \ } } t i | d ƒ d } | | } |  i | | | ƒ \ } } | p | o t Sn | d | d | } d | | }	 | t j o |  i |	 ƒ Sn |  i |	 | ƒ Sd  S(   Ns   @i   s   :s   http://(   s	   splithosts   urls   hosts   selectors   strings   finds   is   selfs   get_user_passwds   realms   users   passwds   Nones   newurls   datas   open(
   s   selfs   urls   realms   datas   hosts   selectors   is   users   passwds   newurls5   /home/guest/edwardam/cmp2/py2/lib/python2.0/urllib.pys   retry_http_basic_auth/s    
 c 
   s™   t  | ƒ \ } } t i | d ƒ d } | | } |  i | | | ƒ \ } } | p | o t Sn | d | d | } d | | }	 |  i |	 ƒ Sd  S(   Ns   @i   s   :s   //(   s	   splithosts   urls   hosts   selectors   strings   finds   is   selfs   get_user_passwds   realms   users   passwds   Nones   newurls
   open_https(
   s   selfs   urls   realms   datas   hosts   selectors   is   users   passwds   newurls5   /home/guest/edwardam/cmp2/py2/lib/python2.0/urllib.pys   retry_https_basic_auth<s    
 c    s™   | d t i | ƒ } |  i i | ƒ o$ | o |  i | =n |  i | Sn |  i	 | | ƒ \ } } | p | o | | f |  i | <n | | f Sd  S(   Ns   @(   s   realms   strings   lowers   hosts   keys   selfs
   auth_caches   has_keys   clear_caches   prompt_user_passwds   users   passwd(   s   selfs   hosts   realms   clear_caches   keys   users   passwds5   /home/guest/edwardam/cmp2/py2/lib/python2.0/urllib.pys   get_user_passwdFs     i    c    sn   d k  } y@ t d | | f ƒ } | i  d | | | f ƒ } | | f SWn t j
 o Ht t f Sn Xd S(   s#   Override this in a GUI environment!Ns   Enter username for %s at %s: s#   Enter password for %s in %s at %s: (   s   getpasss	   raw_inputs   realms   hosts   users   passwds   KeyboardInterrupts   None(   s   selfs   hosts   realms   getpasss   users   passwds5   /home/guest/edwardam/cmp2/py2/lib/python2.0/urllib.pys   prompt_user_passwdQs     	(   s   __doc__s   __init__s   http_error_defaults   Nones   http_error_302s   http_error_301s   http_error_401s   retry_http_basic_auths   retry_https_basic_auths   get_user_passwds   prompt_user_passwd(    s5   /home/guest/edwardam/cmp2/py2/lib/python2.0/urllib.pys   FancyURLopenerýs    		
c      s#   t  o t i d ƒ a  n t  Sd S(   s8   Return the IP address of the magic hostname 'localhost'.s	   localhostN(   s
   _localhosts   sockets   gethostbyname(    s5   /home/guest/edwardam/cmp2/py2/lib/python2.0/urllib.pys	   localhostbs
      c      s)   t  o t i t i ƒ  ƒ a  n t  Sd S(   s*   Return the IP address of the current host.N(   s	   _thishosts   sockets   gethostbynames   gethostname(    s5   /home/guest/edwardam/cmp2/py2/lib/python2.0/urllib.pys   thishostjs
      c     s&   t  o d k }  |  i a  n t  Sd S(   s1   Return the set of errors raised by the FTP class.N(   s
   _ftperrorss   ftplibs
   all_errors(   s   ftplibs5   /home/guest/edwardam/cmp2/py2/lib/python2.0/urllib.pys	   ftperrorsrs      	c     sK   t  o; d k }  d k } |  i | i ƒ  d ƒ a  t  i i ƒ  n t  Sd S(   s)   Return an empty mimetools.Message object.Ni    (   s
   _noheaderss	   mimetoolss   StringIOs   Messages   fps   close(   s	   mimetoolss   StringIOs5   /home/guest/edwardam/cmp2/py2/lib/python2.0/urllib.pys	   noheaders{s      		s
   ftpwrapperc      s5   d  Z  d „  Z d „  Z d „  Z d „  Z d „  Z RS(   s;   Class used by open_ftp() for cache of open FTP connections.c    s;   | |  _  | |  _ | |  _ | |  _ | |  _ |  i ƒ  d  S(   N(   s   users   selfs   passwds   hosts   ports   dirss   init(   s   selfs   users   passwds   hosts   ports   dirss5   /home/guest/edwardam/cmp2/py2/lib/python2.0/urllib.pys   __init__‹s    					c    s}   d  k  } d |  _ | i ƒ  |  _ |  i i |  i |  i ƒ |  i i |  i	 |  i
 ƒ x# |  i d r } |  i i | ƒ q_ Wd  S(   Ni    (   s   ftplibs   selfs   busys   FTPs   ftps   connects   hosts   ports   logins   users   passwds   dirss   dirs   cwd(   s   selfs   ftplibs   dirs5   /home/guest/edwardam/cmp2/py2/lib/python2.0/urllib.pys   init“s    		 c    sê  d  k  } |  i ƒ  | d d f j o d } d } n d | } d } y |  i i | ƒ Wn0 | i j
 o! |  i	 ƒ  |  i i | ƒ n Xt
 } | o | oË y |  i i | ƒ Wn4 | i j
 o% } t d | f t i ƒ  d ‚ n X|  i i | ƒ y  d	 | } |  i i | ƒ } WnI | i j
 o: } | d
  d j o  t d | f t i ƒ  d ‚ n n Xn | oA |  i i d ƒ | o d | } n d } |  i i | ƒ } n d |  _ t | d i d ƒ |  i ƒ | d f Sd  S(   Ns   ds   Ds   TYPE Ai   s   TYPE i    s	   ftp errori   s   RETR i   s   550s   LIST s   LISTs   rb(   s   ftplibs   selfs   endtransfers   types   cmds   isdirs   ftps   voidcmds
   all_errorss   inits   Nones   conns   files   nlsts
   error_perms   reasons   IOErrors   syss   exc_infos   ntransfercmds   busys   addclosehooks   makefile(   s   selfs   files   types   ftplibs   cmds   isdirs   conns   reasons5   /home/guest/edwardam/cmp2/py2/lib/python2.0/urllib.pys   retrfileœs@    	
 
!
) 	c    sJ   |  i o d  Sn d |  _ y |  i i ƒ  Wn t ƒ  j
 o n Xd  S(   Ni    (   s   selfs   busys   ftps   voidresps	   ftperrors(   s   selfs5   /home/guest/edwardam/cmp2/py2/lib/python2.0/urllib.pys   endtransferÁs    	c    s8   |  i ƒ  y |  i i ƒ  Wn t ƒ  j
 o n Xd  S(   N(   s   selfs   endtransfers   ftps   closes	   ftperrors(   s   selfs5   /home/guest/edwardam/cmp2/py2/lib/python2.0/urllib.pys   closeÊs
    
(   s   __doc__s   __init__s   inits   retrfiles   endtransfers   close(    s5   /home/guest/edwardam/cmp2/py2/lib/python2.0/urllib.pys
   ftpwrapperˆs    				%		s   addbasec      s#   d  Z  d „  Z d „  Z d „  Z RS(   s(   Base class for addinfo and addclosehook.c    sw   | |  _  |  i  i |  _ |  i  i |  _ t |  i  d ƒ o |  i  i |  _ n t |  i  d ƒ o |  i  i |  _ n d  S(   Ns	   readliness   fileno(   s   fps   selfs   reads   readlines   hasattrs	   readliness   fileno(   s   selfs   fps5   /home/guest/edwardam/cmp2/py2/lib/python2.0/urllib.pys   __init__Ôs    	  c    s&   d |  i i t |  ƒ |  i f Sd  S(   Ns   <%s at %s whose fp = %s>(   s   selfs	   __class__s   __name__s   ids   fp(   s   selfs5   /home/guest/edwardam/cmp2/py2/lib/python2.0/urllib.pys   __repr__Ûs    c    sL   t  |  _ t  |  _ t  |  _ t  |  _ |  i o |  i i ƒ  n t  |  _ d  S(   N(   s   Nones   selfs   reads   readlines	   readliness   filenos   fps   close(   s   selfs5   /home/guest/edwardam/cmp2/py2/lib/python2.0/urllib.pys   closeßs    				
 (   s   __doc__s   __init__s   __repr__s   close(    s5   /home/guest/edwardam/cmp2/py2/lib/python2.0/urllib.pys   addbaseÑs    		s   addclosehookc      s   d  Z  d „  Z d „  Z RS(   s*   Class to add a close hook to an open file.c    s&   t  i |  | ƒ | |  _ | |  _ d  S(   N(   s   addbases   __init__s   selfs   fps	   closehooks   hookargs(   s   selfs   fps	   closehooks   hookargss5   /home/guest/edwardam/cmp2/py2/lib/python2.0/urllib.pys   __init__ês    	c    sD   t  i |  ƒ |  i o) t |  i |  i ƒ t |  _ t |  _ n d  S(   N(   s   addbases   closes   selfs	   closehooks   applys   hookargss   None(   s   selfs5   /home/guest/edwardam/cmp2/py2/lib/python2.0/urllib.pys   closeïs
    
	(   s   __doc__s   __init__s   close(    s5   /home/guest/edwardam/cmp2/py2/lib/python2.0/urllib.pys   addclosehookçs    	s   addinfoc      s   d  Z  d „  Z d „  Z RS(   s.   class to add an info() method to an open file.c    s   t  i |  | ƒ | |  _ d  S(   N(   s   addbases   __init__s   selfs   fps   headers(   s   selfs   fps   headerss5   /home/guest/edwardam/cmp2/py2/lib/python2.0/urllib.pys   __init__ùs    c    s   |  i Sd  S(   N(   s   selfs   headers(   s   selfs5   /home/guest/edwardam/cmp2/py2/lib/python2.0/urllib.pys   infoýs    (   s   __doc__s   __init__s   info(    s5   /home/guest/edwardam/cmp2/py2/lib/python2.0/urllib.pys   addinfoös    	s
   addinfourlc      s#   d  Z  d „  Z d „  Z d „  Z RS(   s9   class to add info() and geturl() methods to an open file.c    s&   t  i |  | ƒ | |  _ | |  _ d  S(   N(   s   addbases   __init__s   selfs   fps   headerss   url(   s   selfs   fps   headerss   urls5   /home/guest/edwardam/cmp2/py2/lib/python2.0/urllib.pys   __init__s    	c    s   |  i Sd  S(   N(   s   selfs   headers(   s   selfs5   /home/guest/edwardam/cmp2/py2/lib/python2.0/urllib.pys   infos    c    s   |  i Sd  S(   N(   s   selfs   url(   s   selfs5   /home/guest/edwardam/cmp2/py2/lib/python2.0/urllib.pys   geturls    (   s   __doc__s   __init__s   infos   geturl(    s5   /home/guest/edwardam/cmp2/py2/lib/python2.0/urllib.pys
   addinfourl s    		c 	   s	  t  | ƒ \ } } | o | Sn t | ƒ \ } } t  |  ƒ \ } } | o# | o | d | | Sn | Sn t | ƒ \ } } t | ƒ \ } } t
 | ƒ \ } } | d  d j oû | d  d d f j o t | ƒ } n t i | d ƒ } | d j  o | o
 d } n d } n | | d  } x{ | o | d  d	 j ob | d } t i | d  d ƒ } | d j o | | d  } n | d j o d } Pn d } q(W| | } n | o | o | d | | Sn3 | o | d
 | Sn | o d | | Sn | Sd S(   s;   Utility to combine a URL with a base URL to form a new URL.s   ://i   s   /s   #s   ?i    s    i   s   ../s   :s   //N(   s	   splittypes   urls   types   paths	   splithosts   hosts   bases   basepaths   splittags   basetags
   splitquerys	   basequerys   lens   is   strings   rfind(	   s   bases   urls   types   paths   hosts   basepaths   basetags	   basequerys   is5   /home/guest/edwardam/cmp2/py2/lib/python2.0/urllib.pys   basejoinsP      

 
   c    s}   t  i |  ƒ }  |  d  d j o |  d d j o t  i |  d d !ƒ }  n |  d  d j o t  i |  d ƒ }  n |  Sd S(   s8   unwrap('<URL:type://host/path>') --> 'type://host/path'.i   s   <s   >i   s   URL:N(   s   strings   strips   url(   s   urls5   /home/guest/edwardam/cmp2/py2/lib/python2.0/urllib.pys   unwrapWs     # c    s~   t  t j o d k } | i d ƒ a  n t  i |  ƒ } | o1 | i d ƒ } | i ƒ  |  t	 | ƒ d f Sn t |  f Sd S(   s:   splittype('type:opaquestring') --> 'type', 'opaquestring'.Ns
   ^([^/:]+):i   (
   s	   _typeprogs   Nones   res   compiles   matchs   urls   groups   schemes   lowers   len(   s   urls   res   matchs   schemes5   /home/guest/edwardam/cmp2/py2/lib/python2.0/urllib.pys	   splittype`s      	"c    sa   t  t j o d k } | i d ƒ a  n t  i |  ƒ } | o | i d d ƒ Sn t |  f Sd S(   s;   splithost('//host[:port]/path') --> 'host[:port]', '/path'.Ns   ^//([^/]*)(.*)$i   i   (   s	   _hostprogs   Nones   res   compiles   matchs   urls   group(   s   urls   res   matchs5   /home/guest/edwardam/cmp2/py2/lib/python2.0/urllib.pys	   splithostns      	 c    sj   t  t j o d k } | i d ƒ a  n t  i |  ƒ } | o t t | i d d ƒ ƒ Sn t |  f Sd S(   sJ   splituser('user[:passwd]@host[:port]') --> 'user[:passwd]', 'host[:port]'.Ns   ^([^@]*)@(.*)$i   i   (	   s	   _userprogs   Nones   res   compiles   matchs   hosts   maps   unquotes   group(   s   hosts   res   matchs5   /home/guest/edwardam/cmp2/py2/lib/python2.0/urllib.pys	   splituserzs      	 c    sa   t  t j o d k } | i d ƒ a  n t  i |  ƒ } | o | i d d ƒ Sn |  t f Sd S(   s/   splitpasswd('user:passwd') -> 'user', 'passwd'.Ns   ^([^:]*):(.*)$i   i   (   s   _passwdprogs   Nones   res   compiles   matchs   users   group(   s   users   res   matchs5   /home/guest/edwardam/cmp2/py2/lib/python2.0/urllib.pys   splitpasswd†s      	 c    sa   t  t j o d k } | i d ƒ a  n t  i |  ƒ } | o | i d d ƒ Sn |  t f Sd S(   s*   splitport('host:port') --> 'host', 'port'.Ns   ^(.*):([0-9]+)$i   i   (   s	   _portprogs   Nones   res   compiles   matchs   hosts   group(   s   hosts   res   matchs5   /home/guest/edwardam/cmp2/py2/lib/python2.0/urllib.pys	   splitport“s      	 c    s½   t  t j o d k } | i d ƒ a  n t  i |  ƒ } | op | i d d ƒ \ }  } y+ | o t i	 d ‚ n t i
 | ƒ } Wn t i	 j
 o t } n X|  | f Sn |  | f Sd S(   sÛ   Split host and port, returning numeric port.
    Return given default port if no ':' found; defaults to -1.
    Return numerical port if a valid number are found after ':'.
    Return None if ':' but not a valid number.Ns   ^(.*):(.*)$i   i   s	   no digits(   s
   _nportprogs   Nones   res   compiles   matchs   hosts   groups   ports   strings
   atoi_errors   atois   nports   defport(   s   hosts   defports   res   matchs   ports   nports5   /home/guest/edwardam/cmp2/py2/lib/python2.0/urllib.pys
   splitnportŸs       	 i   c    sa   t  t j o d k } | i d ƒ a  n t  i |  ƒ } | o | i d d ƒ Sn |  t f Sd S(   s/   splitquery('/path?query') --> '/path', 'query'.Ns   ^(.*)\?([^?]*)$i   i   (   s
   _queryprogs   Nones   res   compiles   matchs   urls   group(   s   urls   res   matchs5   /home/guest/edwardam/cmp2/py2/lib/python2.0/urllib.pys
   splitqueryµs      	 c    sa   t  t j o d k } | i d ƒ a  n t  i |  ƒ } | o | i d d ƒ Sn |  t f Sd S(   s)   splittag('/path#tag') --> '/path', 'tag'.Ns   ^(.*)#([^#]*)$i   i   (   s   _tagprogs   Nones   res   compiles   matchs   urls   group(   s   urls   res   matchs5   /home/guest/edwardam/cmp2/py2/lib/python2.0/urllib.pys   splittagÁs      	 c    s(   t  i |  d ƒ } | d | d f Sd S(   sk   splitattr('/path;attr1=value1;attr2=value2;...') ->
        '/path', ['attr1=value1', 'attr2=value2', ...].s   ;i    i   N(   s   strings   splitfieldss   urls   words(   s   urls   wordss5   /home/guest/edwardam/cmp2/py2/lib/python2.0/urllib.pys	   splitattrÌs     c    sa   t  t j o d k } | i d ƒ a  n t  i |  ƒ } | o | i d d ƒ Sn |  t f Sd S(   s-   splitvalue('attr=value') --> 'attr', 'value'.Ns   ^([^=]*)=(.*)$i   i   (   s
   _valueprogs   Nones   res   compiles   matchs   attrs   group(   s   attrs   res   matchs5   /home/guest/edwardam/cmp2/py2/lib/python2.0/urllib.pys
   splitvalueÓs      	 c    sC   |  d  d j o |  d d !o |  d |  d f Sn t |  f Sd S(   s2   splitgophertype('/Xselector') --> 'X', 'selector'.i   s   /i   N(   s   selectors   None(   s   selectors5   /home/guest/edwardam/cmp2/py2/lib/python2.0/urllib.pys   splitgophertypeÞs     c    sÆ   t  } t i } t i |  d ƒ } | d g } | i	 } | d =xq | d rg } | d d !oE y) | | | | d  d ƒ ƒ | d ƒ Wn | d | ƒ n Xn | d | ƒ qG Wt i | d ƒ Sd S(   s"   unquote('abc%20def') -> 'abc def'.s   %i    i   i   i   s    N(   s   chrs   mychrs   strings   atois   myatois   splits   ss   lists   ress   appends   myappends   items   join(   s   ss   mychrs   myatois   lists   ress   myappends   items5   /home/guest/edwardam/cmp2/py2/lib/python2.0/urllib.pys   unquoteäs      			 )c    s=   d |  j o" t i t i |  d ƒ d ƒ }  n t |  ƒ Sd S(   s%   unquote('%7e/abc+def') -> '~/abc def's   +s    N(   s   ss   strings   joins   splits   unquote(   s   ss5   /home/guest/edwardam/cmp2/py2/lib/python2.0/urllib.pys   unquote_plus÷s     "sA   ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789_.-s   /c    s¦   t  t j o' h  a  x t d r } | t  | <q Wn t |  ƒ } xO t t | ƒ ƒ d r9 } | | } t  i
 | ƒ o d t | ƒ | | <n qU Wt i | d ƒ Sd  S(   Ni    s   %%%02xs    (   s
   _fast_safes   Nones   _fast_safe_tests   cs   lists   ss   ress   ranges   lens   is   has_keys   ords   strings   join(   s   ss   cs   ress   is5   /home/guest/edwardam/cmp2/py2/lib/python2.0/urllib.pys   _fast_quotes     	  
c    s“   t  | } t | j o t |  ƒ Sn t |  ƒ } xK t t | ƒ ƒ d r5 } | | } | | j o d t | ƒ | | <n qF Wt i | d ƒ Sd S(   s  quote('abc def') -> 'abc%20def'

    Each part of a URL, e.g. the path info, the query, etc., has a
    different set of reserved characters that must be quoted.

    RFC 2396 Uniform Resource Identifiers (URI): Generic Syntax lists
    the following reserved characters.

    reserved    = ";" | "/" | "?" | ":" | "@" | "&" | "=" | "+" |
                  "$" | ","

    Each of these characters is reserved in some component of a URL,
    but not necessarily in all of them.

    By default, the quote function is intended for quoting the path
    section of a URL.  Thus, it will not encode '/'.  This character
    is reserved, but in typical usage the quote function is being
    called on a path where the existing slash characters are used as
    reserved characters.
    i    s   %%%02xs    N(   s   always_safes   safes   _fast_safe_tests   _fast_quotes   ss   lists   ress   ranges   lens   is   cs   ords   strings   join(   s   ss   safes   ress   is   cs5   /home/guest/edwardam/cmp2/py2/lib/python2.0/urllib.pys   quotes     
 
c    sz   d |  j o\ t i |  d ƒ } x3 t t | ƒ ƒ d r } t | | | ƒ | | <q4 Wt i	 | d ƒ Sn t |  | ƒ Sd S(   s9   Quote the query fragment of a URL; replacing ' ' with '+'s    i    s   +N(
   s   ss   strings   splits   ls   ranges   lens   is   quotes   safes   join(   s   ss   safes   ls   is5   /home/guest/edwardam/cmp2/py2/lib/python2.0/urllib.pys
   quote_plus1s      s    c    sr   g  } xU |  i ƒ  d rE \ } } t t | ƒ ƒ } t t | ƒ ƒ } | i | d | ƒ q Wt i	 | d ƒ Sd S(   s<   Encode a dictionary of form entries into a URL query string.i    s   =s   &N(
   s   ls   dicts   itemss   ks   vs
   quote_pluss   strs   appends   strings   join(   s   dicts   ls   ks   vs5   /home/guest/edwardam/cmp2/py2/lib/python2.0/urllib.pys	   urlencode;s      c     sk   h  }  xZ t i i ƒ  d rG \ } } t i | ƒ } | o | d d j o | |  | d  <n q W|  Sd S(   s  Return a dictionary of scheme -> proxy server URL mappings.

    Scan the environment for variables named <scheme>_proxy;
    this seems to be the standard convention.  If you need a
    different way, you can pass a proxies dictionary to the
    [Fancy]URLopener constructor.

    i    i   s   _proxyN(   s   proxiess   oss   environs   itemss   names   values   strings   lower(   s   proxiess   names   values5   /home/guest/edwardam/cmp2/py2/lib/python2.0/urllib.pys   getproxies_environmentEs      c     s¶   y d k  }  Wn t j
 o h  Sn Xy |  i ƒ  } Wn |  i j
 o h  Sn Xh  } | i d ƒ o | d o9 y | d } Wn |  i j
 o n Xd | | d <n | Sd S(   sÜ   Return a dictionary of scheme -> proxy server URL mappings.

        By convention the mac uses Internet Config to store
        proxies.  An HTTP proxy, for instance, is stored under
        the HttpProxy key.

        Ns   UseHTTPProxys   HTTPProxyHosts	   http://%ss   http(   s   ics   ImportErrors   ICs   configs   errors   proxiess   has_keys   value(   s   ics   configs   proxiess   values5   /home/guest/edwardam/cmp2/py2/lib/python2.0/urllib.pys
   getproxiesVs"     		c     sH  h  }  y d k } Wn t j
 o |  Sn Xyô | i | i d ƒ } | i | d ƒ d } | o´ t | i | d ƒ d ƒ } d | j oL xE | i
 d ƒ d r2 } | i
 d d ƒ \ } } d	 | | f |  | <q Wn< | d
  d j o | |  d <n d | |  d <d | |  d <n | i ƒ  Wn t t t f j
 o n X|  Sd S(   sx   Return a dictionary of scheme -> proxy server URL mappings.

        Win32 uses the registry to store proxies.

        Ns;   Software\Microsoft\Windows\CurrentVersion\Internet Settingss   ProxyEnablei    s   ProxyServers   =s   ;i   s   %s://%si   s   http:s   https	   http://%ss   ftp://%ss   ftp(   s   proxiess   _winregs   ImportErrors   OpenKeys   HKEY_CURRENT_USERs   internetSettingss   QueryValueExs   proxyEnables   strs   proxyServers   splits   ps   protocols   addresss   Closes   WindowsErrors
   ValueErrors	   TypeError(   s   proxiess   _winregs   internetSettingss   proxyEnables   proxyServers   ps   protocols   addresss5   /home/guest/edwardam/cmp2/py2/lib/python2.0/urllib.pys   getproxies_registryus6     			 c      s   t  ƒ  p t ƒ  Sd S(   s¥   Return a dictionary of scheme -> proxy server URL mappings.

        Returns settings gathered from the environment, if specified,
        or the registry.

        N(   s   getproxies_environments   getproxies_registry(    s5   /home/guest/edwardam/cmp2/py2/lib/python2.0/urllib.pys
   getproxiesžs     c     s´   d  k  }  d } x& t d ƒ d r } | t | ƒ } q W| d } |  i  ƒ  } t | ƒ } t | ƒ } |  i  ƒ  } | | j o	 d GHn | GH| GH| GHt | | d ƒ Gd GHd  S(   Ns    i   i    i   s   Wrong!i   s   sec(   s   times   ss   ranges   is   chrs   t0s   quotes   qss   unquotes   uqss   t1s   round(   s   times   ss   is   t0s   qss   uqss   t1s5   /home/guest/edwardam/cmp2/py2/lib/python2.0/urllib.pys   test1¬s     	  
	c    s   d |  | | f GHd  S(   Ns0   Block number: %d, Block size: %d, Total size: %d(   s   blocknums	   blocksizes	   totalsize(   s   blocknums	   blocksizes	   totalsizes5   /home/guest/edwardam/cmp2/py2/lib/python2.0/urllib.pys
   reporthook½s    c    sS  |  o: d d d d d g }  t t d ƒ o |  i d ƒ n n zxò |  d rè } d	 d
 G| Gd	 d
 GHt | t t ƒ \ } } | G| GH| o8 d GHx' | i
 ƒ  d r } | d G| | GHq¥ Wd GHn t | d ƒ } | i ƒ  } ~ d | j o+ t i d d ƒ } t i | | d ƒ } n | GHt t f \ } } qN Wd	 d GHWd  t ƒ  Xd  S(   Ns   /etc/passwds   file:/etc/passwds   file://localhost/etc/passwds   ftp://ftp.python.org/etc/passwds    http://www.python.org/index.htmls
   open_httpss!   https://synergy.as.cmu.edu/~geek/i    s   -i
   s   ======s   :s   rbs   s    i(   (   s   argss   hasattrs	   URLopeners   appends   urls   urlretrieves   Nones
   reporthooks   fns   hs   keyss   ks   opens   fps   reads   datas   strings	   maketranss   tables	   translates
   urlcleanup(   s   argss   urls   fns   hs   ks   fps   datas   tables5   /home/guest/edwardam/cmp2/py2/lib/python2.0/urllib.pys   testÂs6    	 	  	 c  	   s   d  k  }  d  k } y# |  i  | i d d ƒ \ } } Wn& |  i j
 o } | GHd GHd  Sn Xd } xT | d rJ \ } } | d j o | d } n | d j o d GHd Gd	 GHd  Sn qm W| o& | d j o t
 ƒ  n t | ƒ n5 | o	 d GHn x  | d r } t | ƒ i ƒ  GqWd  S(
   Ni   s   ths   Use -h for helpi    s   -ts   -hs&   Usage: python urllib.py [-t] [url ...]s   -t runs self-test;s'   otherwise, contents of urls are printed(   s   getopts   syss   argvs   optss   argss   errors   msgs   ts   os   as   test1s   tests   urls   urlopens   read(	   s   getopts   syss   optss   argss   msgs   ts   os   as   urls5   /home/guest/edwardam/cmp2/py2/lib/python2.0/urllib.pys   mainãs4    #		 		 s   __main__(H   s   __doc__s   strings   sockets   oss   syss   __version__s   MAXFTPCACHEs   names   macurl2paths   url2pathnames   pathname2urls
   nturl2paths   Nones
   _urlopeners   urlopens   urlretrieves
   urlcleanups   ftpcaches	   URLopeners   FancyURLopeners
   _localhosts	   localhosts	   _thishosts   thishosts
   _ftperrorss	   ftperrorss
   _noheaderss	   noheaderss
   ftpwrappers   addbases   addclosehooks   addinfos
   addinfourls   basejoins   unwraps	   _typeprogs	   splittypes	   _hostprogs	   splithosts	   _userprogs	   splitusers   _passwdprogs   splitpasswds	   _portprogs	   splitports
   _nportprogs
   splitnports
   _queryprogs
   splitquerys   _tagprogs   splittags	   splitattrs
   _valueprogs
   splitvalues   splitgophertypes   unquotes   unquote_pluss   always_safes   _fast_safe_tests
   _fast_safes   _fast_quotes   quotes
   quote_pluss	   urlencodes   getproxies_environments
   getproxiess   getproxies_registrys   test1s
   reporthooks   tests   mains   __name__(    s5   /home/guest/edwardam/cmp2/py2/lib/python2.0/urllib.pys   ? sš   								ÿ ³d				I
	H													
	
	
		)
		!	