;
Ðâ"Ic               @   s>  d  Z  d d l Z d d l Z d d l Z d d l Z d d l Z d d l Z d d l Z d d l	 Z	 d d l
 Z
 d d l Z d d l Z d d l Z d d l Z d d l m Z m Z m Z d d l m Z m Z m Z m Z m Z m Z m Z m Z m Z m Z m Z m Z m  Z  m! Z! m" Z" m# Z# d d l$ m% Z% m& Z& y d d l' Z' Wn e( Z) Yn Xe* Z) e j+ d d … Z, e- a. e- e j/ d „ Z0 d „  Z1 e- a2 e- e- e- d	 „ Z3 d
 „  Z4 e
 j5 d e
 j6 ƒ Z7 d „  Z8 Gd „  d ƒ Z9 Gd „  d ƒ Z: d „  Z; Gd „  d ƒ Z< Gd „  d e< ƒ Z= Gd „  d e< ƒ Z> Gd „  d e< ƒ Z? d „  Z@ Gd „  d e< ƒ ZA Gd „  d ƒ ZB Gd „  d  eB ƒ ZC Gd! „  d" ƒ ZD Gd# „  d$ eD e< ƒ ZE Gd% „  d& eD e< ƒ ZF d' „  ZG Gd( „  d) ƒ ZH Gd* „  d+ e< eH ƒ ZI Gd, „  d- e< eH ƒ ZJ Gd. „  d/ e< ƒ ZK Gd0 „  d1 eK ƒ ZL eM e jN d2 ƒ o Gd3 „  d4 eK ƒ ZO n Gd5 „  d6 e< ƒ ZP Gd7 „  d8 e< ƒ ZQ d9 „  ZR d: „  ZS Gd; „  d< e< ƒ ZT d= „  ZU Gd> „  d? e< ƒ ZV Gd@ „  dA eV ƒ ZW dB ZX e jY dC k o d dD lZ m[ Z[ m\ Z\ n= e jY dE k o d dD l] m[ Z[ m\ Z\ n dF „  Z[ dG „  Z\ i  Z^ GdH „  dI ƒ Z_ GdJ „  dK e_ ƒ Z` e- aa dL „  Zb e- ac dM „  Zd e- ae dN „  Zf e- ag dO „  Zh GdP „  dQ ƒ Zi dR „  Zj dS „  Zk e jl dT k o dU „  Zm dV „  Zn dW „  Zo nE e jY dE k o( dX „  Zp dY „  Zo dZ „  Zq d[ „  Zn n ej Zo ek Zn d S(\   u
  An extensible library for opening URLs using a variety of protocols

The simplest way to use this module is to call the urlopen function,
which accepts a string containing a URL or a Request object (described
below).  It opens the URL and returns the results as file-like
object; the returned object has some extra methods described below.

The OpenerDirector manages a collection of Handler objects that do
all the actual work.  Each Handler implements a particular protocol or
option.  The OpenerDirector is a composite object that invokes the
Handlers needed to open the requested URL.  For example, the
HTTPHandler performs HTTP GET and POST requests and deals with
non-error returns.  The HTTPRedirectHandler automatically deals with
HTTP 301, 302, 303 and 307 redirect errors, and the HTTPDigestAuthHandler
deals with digest authentication.

urlopen(url, data=None) -- Basic usage is the same as original
urllib.  pass the url and optionally data to post to an HTTP URL, and
get a file-like object back.  One difference is that you can also pass
a Request instance instead of URL.  Raises a URLError (subclass of
IOError); for HTTP errors, raises an HTTPError, which can also be
treated as a valid response.

build_opener -- Function that creates a new OpenerDirector instance.
Will install the default handlers.  Accepts one or more Handlers as
arguments, either instances or Handler classes that it will
instantiate.  If one of the argument is a subclass of the default
handler, the argument will be installed instead of the default.

install_opener -- Installs a new opener as the default opener.

objects of interest:
OpenerDirector --

Request -- An object that encapsulates the state of a request.  The
state can be as simple as the URL.  It can also include extra HTTP
headers, e.g. a User-Agent.

BaseHandler --

internals:
BaseHandler and parent
_call_chain conventions

Example usage:

import urllib.request

# set up authentication info
authinfo = urllib.request.HTTPBasicAuthHandler()
authinfo.add_password(realm='PDQ Application',
                      uri='https://mahler:8092/site-updates.py',
                      user='klem',
                      passwd='geheim$parole')

proxy_support = urllib.request.ProxyHandler({"http" : "http://ahad-haam:3128"})

# build a new opener that adds authentication and caching FTP handlers
opener = urllib.request.build_opener(proxy_support, authinfo,
                                     urllib.request.CacheFTPHandler)

# install it
urllib.request.install_opener(opener)

f = urllib.request.urlopen('http://www.python.org/')
i    N(   u   URLErroru	   HTTPErroru   ContentTooShortError(   u   urlparseu   urlsplitu   urljoinu   unwrapu   quoteu   unquoteu	   splittypeu	   splithostu	   splitportu	   splituseru   splitpasswdu	   splitattru
   splitqueryu
   splitvalueu   to_bytesu
   urlunparse(   u
   addinfourlu   addclosehooki   c             C   s-   t  d  k o t ƒ  a  n t  j |  | | ƒ S(   N(   u   _openeru   Noneu   build_openeru   open(   u   urlu   datau   timeout(    (    u+   /mit/python/lib/python3.0/urllib/request.pyu   urlopenv   s    c             C   s
   |  a  d  S(   N(   u   _opener(   u   opener(    (    u+   /mit/python/lib/python3.0/urllib/request.pyu   install_opener|   s    c             C   s*   t  p t ƒ  a  n t  j |  | | | ƒ S(   N(   u
   _urlopeneru   FancyURLopeneru   retrieve(   u   urlu   filenameu
   reporthooku   data(    (    u+   /mit/python/lib/python3.0/urllib/request.pyu   urlretrieve‚   s    c               C   s*   t  o t  j ƒ  n t o
 d  a n d  S(   N(   u
   _urlopeneru   cleanupu   _openeru   None(    (    (    u+   /mit/python/lib/python3.0/urllib/request.pyu
   urlcleanupˆ   s    u   :\d+$c             C   s^   |  j  ƒ  } t | ƒ d } | d k o |  j d d ƒ } n t j d | d ƒ } | j ƒ  S(   uˆ   Return request-host, as defined by RFC 2965.

    Variation from RFC: returned value is lowercased, for convenient
    comparison.

    i   u    u   Host(   u   get_full_urlu   urlparseu
   get_headeru   _cut_port_reu   subu   lower(   u   requestu   urlu   host(    (    u+   /mit/python/lib/python3.0/urllib/request.pyu   request_host‘   s    c             B   sÈ   |  Ee  Z d i  d d d  „ Z d „  Z d „  Z d „  Z d „  Z d „  Z	 d „  Z
 d „  Z d „  Z d	 „  Z d
 „  Z d „  Z d „  Z d „  Z d „  Z d „  Z d „  Z d d „ Z d „  Z d S(   c             C   s¥   t  | ƒ |  _ d  |  _ d  |  _ d  |  _ | |  _ i  |  _ x* | j ƒ  D] \ } } |  j	 | | ƒ qI Wi  |  _
 | d  k o t |  ƒ } n | |  _ | |  _ d  S(   N(   u   unwrapu   _Request__originalu   Noneu   typeu   hostu   portu   datau   headersu   itemsu
   add_headeru   unredirected_hdrsu   request_hostu   origin_req_hostu   unverifiable(   u   selfu   urlu   datau   headersu   origin_req_hostu   unverifiableu   keyu   value(    (    u+   /mit/python/lib/python3.0/urllib/request.pyu   __init__£   s    					 		c             C   sq   | d  d … d k oJ | d d  … } t  t d | ƒ o" t |  d | ƒ ƒ  t |  | ƒ Sn t | ƒ ‚ d  S(   Ni   u   _Request__r_u   get_(   u   hasattru   Requestu   getattru   AttributeError(   u   selfu   attru   name(    (    u+   /mit/python/lib/python3.0/urllib/request.pyu   __getattr__µ   s    c             C   s   |  j  ƒ  o d Sd Sd  S(   Nu   POSTu   GET(   u   has_data(   u   self(    (    u+   /mit/python/lib/python3.0/urllib/request.pyu
   get_methodÁ   s    c             C   s   | |  _  d  S(   N(   u   data(   u   selfu   data(    (    u+   /mit/python/lib/python3.0/urllib/request.pyu   add_dataÉ   s    c             C   s   |  j  d  k	 S(   N(   u   datau   None(   u   self(    (    u+   /mit/python/lib/python3.0/urllib/request.pyu   has_dataÌ   s    c             C   s   |  j  S(   N(   u   data(   u   self(    (    u+   /mit/python/lib/python3.0/urllib/request.pyu   get_dataÏ   s    c             C   s   |  j  S(   N(   u   _Request__original(   u   self(    (    u+   /mit/python/lib/python3.0/urllib/request.pyu   get_full_urlÒ   s    c             C   s]   |  j  d  k oF t |  j ƒ \ |  _  |  _ |  j  d  k o t d |  j ƒ ‚ qV n |  j  S(   Nu   unknown url type: %s(   u   typeu   Noneu	   splittypeu   _Request__originalu   _Request__r_typeu
   ValueError(   u   self(    (    u+   /mit/python/lib/python3.0/urllib/request.pyu   get_typeÕ   s
    c             C   sV   |  j  d  k o? t |  j ƒ \ |  _  |  _ |  j  o t |  j  ƒ |  _  qO n |  j  S(   N(   u   hostu   Noneu	   splithostu   _Request__r_typeu   _Request__r_hostu   unquote(   u   self(    (    u+   /mit/python/lib/python3.0/urllib/request.pyu   get_hostÜ   s
    
c             C   s   |  j  S(   N(   u   _Request__r_host(   u   self(    (    u+   /mit/python/lib/python3.0/urllib/request.pyu   get_selectorã   s    c             C   s#   | | |  _  |  _ |  j |  _ d  S(   N(   u   hostu   typeu   _Request__originalu   _Request__r_host(   u   selfu   hostu   type(    (    u+   /mit/python/lib/python3.0/urllib/request.pyu	   set_proxyæ   s    c             C   s   |  j  |  j k S(   N(   u   _Request__r_hostu   _Request__original(   u   self(    (    u+   /mit/python/lib/python3.0/urllib/request.pyu	   has_proxyê   s    c             C   s   |  j  S(   N(   u   origin_req_host(   u   self(    (    u+   /mit/python/lib/python3.0/urllib/request.pyu   get_origin_req_hostí   s    c             C   s   |  j  S(   N(   u   unverifiable(   u   self(    (    u+   /mit/python/lib/python3.0/urllib/request.pyu   is_unverifiableð   s    c             C   s   | |  j  | j ƒ  <d  S(   N(   u   headersu
   capitalize(   u   selfu   keyu   val(    (    u+   /mit/python/lib/python3.0/urllib/request.pyu
   add_headeró   s    c             C   s   | |  j  | j ƒ  <d  S(   N(   u   unredirected_hdrsu
   capitalize(   u   selfu   keyu   val(    (    u+   /mit/python/lib/python3.0/urllib/request.pyu   add_unredirected_header÷   s    c             C   s   | |  j  k p | |  j k S(   N(   u   headersu   unredirected_hdrs(   u   selfu   header_name(    (    u+   /mit/python/lib/python3.0/urllib/request.pyu
   has_headerû   s    c             C   s"   |  j  j | |  j j | | ƒ ƒ S(   N(   u   headersu   getu   unredirected_hdrs(   u   selfu   header_nameu   default(    (    u+   /mit/python/lib/python3.0/urllib/request.pyu
   get_headerÿ   s    	c             C   s/   |  j  j ƒ  } | j |  j ƒ t | j ƒ  ƒ S(   N(   u   unredirected_hdrsu   copyu   updateu   headersu   listu   items(   u   selfu   hdrs(    (    u+   /mit/python/lib/python3.0/urllib/request.pyu   header_items  s    NF(   u   __name__u
   __module__u   Noneu   Falseu   __init__u   __getattr__u
   get_methodu   add_datau   has_datau   get_datau   get_full_urlu   get_typeu   get_hostu   get_selectoru	   set_proxyu	   has_proxyu   get_origin_req_hostu   is_unverifiableu
   add_headeru   add_unredirected_headeru
   has_headeru
   get_headeru   header_items(   u
   __locals__(    (    u+   /mit/python/lib/python3.0/urllib/request.pyu   Request¡   s(   
																u   Requestc             B   sY   |  Ee  Z d  „  Z d „  Z d „  Z d „  Z d e j d „ Z	 d d „ Z
 d „  Z d S(   c             C   sM   d t  } d | f g |  _ g  |  _ i  |  _ i  |  _ i  |  _ i  |  _ d  S(   Nu   Python-urllib/%su
   User-agent(   u   __version__u
   addheadersu   handlersu   handle_openu   handle_erroru   process_responseu   process_request(   u   selfu   client_version(    (    u+   /mit/python/lib/python3.0/urllib/request.pyu   __init__
  s    
				c          
   C   sè  t  | d ƒ p t d t | ƒ ƒ ‚ n d } x†t | ƒ D]x} | d k o q= n | j d ƒ } | d  | … } | | d d  … } | j d ƒ ox | j d ƒ | d } | | d d  … } y t | ƒ } Wn t k
 o Yn X|  j	 j
 | i  ƒ }	 |	 |  j	 | <nd | d	 k o | } |  j }	 nD | d
 k o | } |  j }	 n$ | d k o | } |  j }	 n q= |	 j | g  ƒ }
 |
 o t j |
 | ƒ n |
 j | ƒ d } q= W| o$ t j |  j | ƒ | j |  ƒ n d  S(   Nu
   add_parentu%   expected BaseHandler instance, got %ru   redirect_requestu   do_openu
   proxy_openu   _i   u   erroru   openu   responseu   requestF(   u   redirect_requestu   do_openu
   proxy_openT(   u   hasattru	   TypeErroru   typeu   Falseu   diru   findu
   startswithu   intu
   ValueErroru   handle_erroru   getu   handle_openu   process_responseu   process_requestu
   setdefaultu   bisectu   insortu   appendu   Trueu   handlersu
   add_parent(   u   selfu   handleru   addedu   methu   iu   protocolu	   conditionu   ju   kindu   lookupu   handlers(    (    u+   /mit/python/lib/python3.0/urllib/request.pyu   add_handler  sL     
c             C   s   d  S(   N(    (   u   self(    (    u+   /mit/python/lib/python3.0/urllib/request.pyu   closeE  s    c       	      G   sT   | j  | d ƒ } x; | D]3 } t | | ƒ } | | Œ  } | d  k	 o | Sq Wd  S(   N(    (   u   getu   getattru   None(	   u   selfu   chainu   kindu	   meth_nameu   argsu   handlersu   handleru   funcu   result(    (    u+   /mit/python/lib/python3.0/urllib/request.pyu   _call_chainI  s     c       
      C   sÿ   t  | t ƒ o t | | ƒ } n% | } | d  k	 o | j | ƒ n | | _ | j ƒ  } | d } x8 |  j j | g  ƒ D]! } t	 | | ƒ } | | ƒ } q| W|  j
 | | ƒ }	 | d } x; |  j j | g  ƒ D]$ } t	 | | ƒ } | | |	 ƒ }	 qÓ W|	 S(   Nu   _requestu	   _response(   u
   isinstanceu   stru   Requestu   Noneu   add_datau   timeoutu   get_typeu   process_requestu   getu   getattru   _openu   process_response(
   u   selfu   fullurlu   datau   timeoutu   requ   protocolu	   meth_nameu	   processoru   methu   response(    (    u+   /mit/python/lib/python3.0/urllib/request.pyu   openU  s&    	
 
 c             C   sw   |  j  |  j d d | ƒ } | o | S| j ƒ  } |  j  |  j | | d | ƒ } | o | S|  j  |  j d d | ƒ S(   Nu   defaultu   default_openu   _openu   unknownu   unknown_open(   u   _call_chainu   handle_openu   get_type(   u   selfu   requ   datau   resultu   protocol(    (    u+   /mit/python/lib/python3.0/urllib/request.pyu   _openq  s    c             G   s±   | d
 k o1 |  j  d } | d } d | } d } | } n |  j  } | d } d } | | | f | } |  j | Œ  } | o | S| o! | d d	 f | } |  j | Œ  Sd  S(   Nu   httpu   httpsi   u   http_error_%si   u   _errori    u   defaultu   http_error_default(   u   httpu   https(   u   handle_erroru   _call_chain(   u   selfu   protou   argsu   dictu	   meth_nameu   http_erru	   orig_argsu   result(    (    u+   /mit/python/lib/python3.0/urllib/request.pyu   error€  s     


	
N(   u   __name__u
   __module__u   __init__u   add_handleru   closeu   _call_chainu   Noneu   socketu   _GLOBAL_DEFAULT_TIMEOUTu   openu   _openu   error(   u
   __locals__(    (    u+   /mit/python/lib/python3.0/urllib/request.pyu   OpenerDirector	  s   
	
	1		u   OpenerDirectorc           	   G   sM  d „  } t  ƒ  } t t t t t t t t g } t	 t
 j d ƒ o | j t ƒ n t ƒ  } xr | D]j } xa |  D]Y } | | ƒ o% t | | ƒ o | j | ƒ qÊ qq t | | ƒ o | j | ƒ qq qq Wqd Wx | D] } | j | ƒ qÙ Wx | D] } | j | ƒ  ƒ q÷ Wx5 |  D]- } | | ƒ o | ƒ  } n | j | ƒ qW| S(   u  Create an opener object from a list of handlers.

    The opener will use several default handlers, including support
    for HTTP and FTP.

    If any of the handlers passed as arguments are subclasses of the
    default handlers, the default handlers will not be used.
    c             S   s   t  |  t ƒ p t |  d ƒ S(   Nu	   __bases__(   u
   isinstanceu   typeu   hasattr(   u   obj(    (    u+   /mit/python/lib/python3.0/urllib/request.pyu   isclass¢  s    u   HTTPSConnection(   u   OpenerDirectoru   ProxyHandleru   UnknownHandleru   HTTPHandleru   HTTPDefaultErrorHandleru   HTTPRedirectHandleru
   FTPHandleru   FileHandleru   HTTPErrorProcessoru   hasattru   httpu   clientu   appendu   HTTPSHandleru   setu
   issubclassu   addu
   isinstanceu   removeu   add_handler(   u   handlersu   isclassu   openeru   default_classesu   skipu   klassu   checku   h(    (    u+   /mit/python/lib/python3.0/urllib/request.pyu   build_opener™  s:    					     c             B   s/   |  Ee  Z d  Z d „  Z d „  Z d „  Z d S(   iô  c             C   s   | |  _  d  S(   N(   u   parent(   u   selfu   parent(    (    u+   /mit/python/lib/python3.0/urllib/request.pyu
   add_parentÂ  s    c             C   s   d  S(   N(    (   u   self(    (    u+   /mit/python/lib/python3.0/urllib/request.pyu   closeÅ  s    c             C   s%   t  | d ƒ p d S|  j | j k  S(   Nu   handler_orderT(   u   hasattru   Trueu   handler_order(   u   selfu   other(    (    u+   /mit/python/lib/python3.0/urllib/request.pyu   __lt__É  s    N(   u   __name__u
   __module__u   handler_orderu
   add_parentu   closeu   __lt__(   u
   __locals__(    (    u+   /mit/python/lib/python3.0/urllib/request.pyu   BaseHandler¿  s   
		u   BaseHandlerc             B   s)   |  Ee  Z d  Z d Z d „  Z e Z d S(   u   Process HTTP error responses.iè  c             C   sg   | j  | j | j ƒ  } } } d | k o
 d k  n p% |  j j d | | | | | ƒ } n | S(   NiÈ   i,  u   http(   u   codeu   msgu   infou   parentu   error(   u   selfu   requestu   responseu   codeu   msgu   hdrs(    (    u+   /mit/python/lib/python3.0/urllib/request.pyu   http_responseÖ  s
     	N(   u   __name__u
   __module__u   __doc__u   handler_orderu   http_responseu   https_response(   u
   __locals__(    (    u+   /mit/python/lib/python3.0/urllib/request.pyu   HTTPErrorProcessorÒ  s   
	u   HTTPErrorProcessorc             B   s   |  Ee  Z d  „  Z d S(   c             C   s"   t  | j ƒ  | | | | ƒ ‚ d  S(   N(   u	   HTTPErroru   get_full_url(   u   selfu   requ   fpu   codeu   msgu   hdrs(    (    u+   /mit/python/lib/python3.0/urllib/request.pyu   http_error_defaultä  s    N(   u   __name__u
   __module__u   http_error_default(   u
   __locals__(    (    u+   /mit/python/lib/python3.0/urllib/request.pyu   HTTPDefaultErrorHandlerã  s   
u   HTTPDefaultErrorHandlerc             B   s@   |  Ee  Z d  Z d Z d „  Z d „  Z e Z Z Z d Z	 d S(   i   i
   c       	         sÁ   | j  ƒ  } | d k o | d k p | d k o
 | d k p" t | j ƒ  | | | | ƒ ‚ n | j d d	 ƒ } d ‰  t ‡  f d †  | j j ƒ  Dƒ ƒ } t | d | d | j ƒ  d d ƒS(   u­  Return a Request or None in response to a redirect.

        This is called by the http_error_30x methods when a
        redirection response is received.  If a redirection should
        take place, return a new Request to allow http_error_30x to
        perform the redirect.  Otherwise, raise HTTPError if no-one
        else should try to handle this url.  Return None if you can't
        but another Handler might.
        i-  i.  i/  i3  u   GETu   HEADu   POSTu    u   %20u   content-lengthu   content-typec             3   s8   |  ]. \ } } | j  ƒ  ˆ  k o | | f Vq q d  S(   N(   u   lower(   u   .0u   ku   v(   u   CONTENT_HEADERS(    u+   /mit/python/lib/python3.0/urllib/request.pyu	   <genexpr>  s    	u   headersu   origin_req_hostu   unverifiable(   i-  i.  i/  i3  (   u   GETu   HEAD(   i-  i.  i/  (   u   content-lengthu   content-typeT(
   u
   get_methodu	   HTTPErroru   get_full_urlu   replaceu   dictu   headersu   itemsu   Requestu   get_origin_req_hostu   True(	   u   selfu   requ   fpu   codeu   msgu   headersu   newurlu   mu
   newheaders(    (   u   CONTENT_HEADERSu+   /mit/python/lib/python3.0/urllib/request.pyu   redirect_requestï  s    
"%	c       
      C   sŒ  d | k o | d } n  d | k o | d } n d  St  | ƒ } | j p t | ƒ } d | d <n t | ƒ } t | j ƒ  | ƒ } |  j | | | | | | ƒ } | d  k o d  St | d ƒ oo | j	 }	 | _	 |	 j
 | d ƒ |  j k p t |	 ƒ |  j k o) t | j ƒ  | |  j | | | ƒ ‚ qNn i  }	 | _	 | _	 |	 j
 | d ƒ d |	 | <| j ƒ  | j ƒ  |  j j | ƒ S(   Nu   locationu   uriu   /i   u   redirect_dicti    i   (   u   urlparseu   pathu   listu
   urlunparseu   urljoinu   get_full_urlu   redirect_requestu   Noneu   hasattru   redirect_dictu   getu   max_repeatsu   lenu   max_redirectionsu	   HTTPErroru   inf_msgu   readu   closeu   parentu   open(
   u   selfu   requ   fpu   codeu   msgu   headersu   newurlu   urlpartsu   newu   visited(    (    u+   /mit/python/lib/python3.0/urllib/request.pyu   http_error_302  s2    


uo   The HTTP server returned a redirect error that would lead to an infinite loop.
The last 30x error message was:
N(
   u   __name__u
   __module__u   max_repeatsu   max_redirectionsu   redirect_requestu   http_error_302u   http_error_301u   http_error_303u   http_error_307u   inf_msg(   u
   __locals__(    (    u+   /mit/python/lib/python3.0/urllib/request.pyu   HTTPRedirectHandlerç  s   
	"	-u   HTTPRedirectHandlerc       	      C   sÞ   t  |  ƒ \ } } | j d ƒ p d } |  } n^ | j d ƒ p t d |  ƒ ‚ n | j d d ƒ } | d k o
 d } n | d | … } t | ƒ \ } } | d k	 o t | ƒ \ } } n d } } | | | | f S(   u3  Return (scheme, user, password, host/port) given a URL or an authority.

    If a URL is supplied, it must have an authority (host:port) component.
    According to RFC 3986, having an authority component means the URL must
    have two slashes after the scheme:

    >>> _parse_proxy('file:/ftp.example.com/')
    Traceback (most recent call last):
    ValueError: proxy URL with no authority: 'file:/ftp.example.com/'

    The first three items of the returned tuple may be None.

    Examples of authority parsing:

    >>> _parse_proxy('proxy.example.com')
    (None, None, None, 'proxy.example.com')
    >>> _parse_proxy('proxy.example.com:3128')
    (None, None, None, 'proxy.example.com:3128')

    The authority component may optionally include userinfo (assumed to be
    username:password):

    >>> _parse_proxy('joe:password@proxy.example.com')
    (None, 'joe', 'password', 'proxy.example.com')
    >>> _parse_proxy('joe:password@proxy.example.com:3128')
    (None, 'joe', 'password', 'proxy.example.com:3128')

    Same examples, but with URLs instead:

    >>> _parse_proxy('http://proxy.example.com/')
    ('http', None, None, 'proxy.example.com')
    >>> _parse_proxy('http://proxy.example.com:3128/')
    ('http', None, None, 'proxy.example.com:3128')
    >>> _parse_proxy('http://joe:password@proxy.example.com/')
    ('http', 'joe', 'password', 'proxy.example.com')
    >>> _parse_proxy('http://joe:password@proxy.example.com:3128')
    ('http', 'joe', 'password', 'proxy.example.com:3128')

    Everything after the authority is ignored:

    >>> _parse_proxy('ftp://joe:password@proxy.example.com/rubbish:3128')
    ('ftp', 'joe', 'password', 'proxy.example.com')

    Test for no trailing '/' case:

    >>> _parse_proxy('http://joe:password@proxy.example.com')
    ('http', 'joe', 'password', 'proxy.example.com')

    u   /u   //u   proxy URL with no authority: %ri   iÿÿÿÿN(   u	   splittypeu
   startswithu   Noneu
   ValueErroru   findu	   splituseru   splitpasswd(	   u   proxyu   schemeu   r_schemeu	   authorityu   endu   userinfou   hostportu   useru   password(    (    u+   /mit/python/lib/python3.0/urllib/request.pyu   _parse_proxyE  s    2


c             B   s)   |  Ee  Z d  Z d d „ Z d „  Z d S(   id   c             C   sg   | d  k o t ƒ  } n | |  _ x= | j ƒ  D]/ \ } } t |  d | | | |  j d „ ƒ q0 Wd  S(   Nu   %s_openc             S   s   | |  | | ƒ S(    (    (   u   ru   proxyu   typeu   meth(    (    u+   /mit/python/lib/python3.0/urllib/request.pyu   <lambda>˜  s    (   u   Noneu
   getproxiesu   proxiesu   itemsu   setattru
   proxy_open(   u   selfu   proxiesu   typeu   url(    (    u+   /mit/python/lib/python3.0/urllib/request.pyu   __init__‘  s    	 c             C   sÝ   | j  ƒ  } t | ƒ \ } } } } | d  k o
 | } n | oY | oR d t | ƒ t | ƒ f }	 t j |	 j ƒ  ƒ j d ƒ }
 | j d d |
 ƒ n t | ƒ } | j	 | | ƒ | | k o d  S|  j
 j | ƒ Sd  S(   Nu   %s:%su   asciiu   Proxy-authorizationu   Basic (   u   get_typeu   _parse_proxyu   Noneu   unquoteu   base64u	   b64encodeu   encodeu   decodeu
   add_headeru	   set_proxyu   parentu   open(   u   selfu   requ   proxyu   typeu	   orig_typeu
   proxy_typeu   useru   passwordu   hostportu	   user_passu   creds(    (    u+   /mit/python/lib/python3.0/urllib/request.pyu
   proxy_open›  s    
N(   u   __name__u
   __module__u   handler_orderu   Noneu   __init__u
   proxy_open(   u
   __locals__(    (    u+   /mit/python/lib/python3.0/urllib/request.pyu   ProxyHandler  s   

u   ProxyHandlerc             B   s>   |  Ee  Z d  „  Z d „  Z d „  Z d d „ Z d „  Z d S(   c             C   s   i  |  _  d  S(   N(   u   passwd(   u   self(    (    u+   /mit/python/lib/python3.0/urllib/request.pyu   __init__µ  s    c                s‰   t  | t ƒ o | g } n | ˆ  j k o i  ˆ  j | <n xD d D]< ‰ t ‡  ‡ f d †  | Dƒ ƒ } | | f ˆ  j | | <qE Wd  S(   Nc                s'   g  } |  ] } | ˆ  j  | ˆ ƒ q
 S(    (   u
   reduce_uri(   u   .0u   _[1]u   u(   u   selfu   default_port(    u+   /mit/python/lib/python3.0/urllib/request.pyu
   <listcomp>À  s    TF(   TF(   u
   isinstanceu   stru   passwdu   Trueu   Falseu   tuple(   u   selfu   realmu   uriu   useru   passwdu   reduced_uri(    (   u   selfu   default_portu+   /mit/python/lib/python3.0/urllib/request.pyu   add_password¸  s     c       	      C   s‚   |  j  j | i  ƒ } xf d D]^ } |  j | | ƒ } xC | j ƒ  D]5 \ } } x& | D] } |  j | | ƒ o | SqT WqA Wq Wd S(   NTF(   TF(   NN(   u   passwdu   getu   Trueu   Falseu
   reduce_uriu   itemsu	   is_suburiu   None(	   u   selfu   realmu   authuriu   domainsu   default_portu   reduced_authuriu   urisu   authinfou   uri(    (    u+   /mit/python/lib/python3.0/urllib/request.pyu   find_user_passwordÃ  s       c       
      C   sÑ   t  | ƒ } | d o) | d } | d } | d p d } n d
 } | } d } t | ƒ \ } } | o\ | d
 k oO | d
 k	 oB i d d 6d d 6j | ƒ }	 |	 d
 k	 o d	 | |	 f } qÇ n | | f S(   u@   Accept authority or URI and extract only the authority and path.i   i    i   u   /iP   u   httpi»  u   httpsu   %s:%dN(   u   urlsplitu   Noneu	   splitportu   get(
   u   selfu   uriu   default_portu   partsu   schemeu	   authorityu   pathu   hostu   portu   dport(    (    u+   /mit/python/lib/python3.0/urllib/request.pyu
   reduce_uriÍ  s     

!

	c             C   so   | | k o d S| d | d k o d St j | d | d f ƒ } t | ƒ t | d ƒ k o d Sd S(   uc   Check if test is below base in a URI tree

        Both args must be URIs in reduced form.
        i    i   TF(   u   Trueu   Falseu	   posixpathu   commonprefixu   len(   u   selfu   baseu   testu   common(    (    u+   /mit/python/lib/python3.0/urllib/request.pyu	   is_suburiä  s    NT(   u   __name__u
   __module__u   __init__u   add_passwordu   find_user_passwordu   Trueu
   reduce_uriu	   is_suburi(   u
   __locals__(    (    u+   /mit/python/lib/python3.0/urllib/request.pyu   HTTPPasswordMgr³  s
   
			
u   HTTPPasswordMgrc             B   s   |  Ee  Z d  „  Z d S(   c             C   sF   t  j |  | | ƒ \ } } | d  k	 o | | f St  j |  d  | ƒ S(   N(   u   HTTPPasswordMgru   find_user_passwordu   None(   u   selfu   realmu   authuriu   useru   password(    (    u+   /mit/python/lib/python3.0/urllib/request.pyu   find_user_passwordõ  s
    N(   u   __name__u
   __module__u   find_user_password(   u
   __locals__(    (    u+   /mit/python/lib/python3.0/urllib/request.pyu   HTTPPasswordMgrWithDefaultRealmó  s   
u   HTTPPasswordMgrWithDefaultRealmc             B   sA   |  Ee  Z e j d  e j ƒ Z d d „ Z d „  Z d „  Z	 d S(   u-   (?:.*,)*[ 	]*([^ 	]+)[ 	]+realm=(["'])(.*?)\2c             C   s6   | d  k o t ƒ  } n | |  _ |  j j |  _ d  S(   N(   u   Noneu   HTTPPasswordMgru   passwdu   add_password(   u   selfu   password_mgr(    (    u+   /mit/python/lib/python3.0/urllib/request.pyu   __init__  s    	c       	      C   sz   | j  | d  ƒ } | o] t j j | ƒ } | o@ | j ƒ  \ } } } | j ƒ  d k o |  j | | | ƒ Sqv n d  S(   Nu   basic(   u   getu   Noneu   AbstractBasicAuthHandleru   rxu   searchu   groupsu   loweru   retry_http_basic_auth(	   u   selfu   authrequ   hostu   requ   headersu   mou   schemeu   quoteu   realm(    (    u+   /mit/python/lib/python3.0/urllib/request.pyu   http_error_auth_reqed  s    c             C   sª   |  j  j | | ƒ \ } } | d  k	 oz d | | f } d t j | j ƒ  ƒ j d ƒ } | j j |  j	 d  ƒ | k o d  S| j
 |  j	 | ƒ |  j j | ƒ Sd  Sd  S(   Nu   %s:%su   Basic u   ascii(   u   passwdu   find_user_passwordu   Noneu   base64u	   b64encodeu   encodeu   decodeu   headersu   getu   auth_headeru
   add_headeru   parentu   open(   u   selfu   hostu   requ   realmu   useru   pwu   rawu   auth(    (    u+   /mit/python/lib/python3.0/urllib/request.pyu   retry_http_basic_auth  s    "N(
   u   __name__u
   __module__u   reu   compileu   Iu   rxu   Noneu   __init__u   http_error_auth_reqedu   retry_http_basic_auth(   u
   __locals__(    (    u+   /mit/python/lib/python3.0/urllib/request.pyu   AbstractBasicAuthHandlerý  s
   
		u   AbstractBasicAuthHandlerc             B   s   |  Ee  Z d  Z d „  Z d S(   u   Authorizationc             C   s"   | j  ƒ  } |  j d | | | ƒ S(   Nu   www-authenticate(   u   get_full_urlu   http_error_auth_reqed(   u   selfu   requ   fpu   codeu   msgu   headersu   url(    (    u+   /mit/python/lib/python3.0/urllib/request.pyu   http_error_401.  s    	N(   u   __name__u
   __module__u   auth_headeru   http_error_401(   u
   __locals__(    (    u+   /mit/python/lib/python3.0/urllib/request.pyu   HTTPBasicAuthHandler*  s   
u   HTTPBasicAuthHandlerc             B   s   |  Ee  Z d  Z d „  Z d S(   u   Proxy-authorizationc             C   s"   | j  ƒ  } |  j d | | | ƒ S(   Nu   proxy-authenticate(   u   get_hostu   http_error_auth_reqed(   u   selfu   requ   fpu   codeu   msgu   headersu	   authority(    (    u+   /mit/python/lib/python3.0/urllib/request.pyu   http_error_4078  s    	N(   u   __name__u
   __module__u   auth_headeru   http_error_407(   u
   __locals__(    (    u+   /mit/python/lib/python3.0/urllib/request.pyu   ProxyBasicAuthHandler4  s   
u   ProxyBasicAuthHandlerc             C   s   t  j |  ƒ S(   u   Return n random bytes.(   u   osu   urandom(   u   n(    (    u+   /mit/python/lib/python3.0/urllib/request.pyu   randombytesB  s    c             B   sY   |  Ee  Z d d  „ Z d „  Z d „  Z d „  Z d „  Z d „  Z d „  Z	 d „  Z
 d S(	   c             C   sH   | d  k o t ƒ  } n | |  _ |  j j |  _ d |  _ d |  _ d  S(   Ni    (   u   Noneu   HTTPPasswordMgru   passwdu   add_passwordu   retriedu   nonce_count(   u   selfu   passwd(    (    u+   /mit/python/lib/python3.0/urllib/request.pyu   __init__Q  s    		c             C   s   d |  _  d  S(   Ni    (   u   retried(   u   self(    (    u+   /mit/python/lib/python3.0/urllib/request.pyu   reset_retry_countY  s    c             C   s–   | j  | d  ƒ } |  j d k o" t | j ƒ  d d | d  ƒ ‚ n |  j d 7_ | o8 | j ƒ  d } | j ƒ  d k o |  j | | ƒ Sn d  S(   Ni   i‘  u   digest auth failedi   i    u   digest(   u   getu   Noneu   retriedu	   HTTPErroru   get_full_urlu   splitu   loweru   retry_http_digest_auth(   u   selfu   auth_headeru   hostu   requ   headersu   authrequ   scheme(    (    u+   /mit/python/lib/python3.0/urllib/request.pyu   http_error_auth_reqed\  s    c             C   s¨   | j  d d ƒ \ } } t t d  t | ƒ ƒ ƒ } |  j | | ƒ } | oX d | } | j j |  j d  ƒ | k o d  S| j	 |  j | ƒ |  j
 j | ƒ } | Sd  S(   Nu    i   u	   Digest %s(   u   splitu   parse_keqv_listu   filteru   Noneu   parse_http_listu   get_authorizationu   headersu   getu   auth_headeru   add_unredirected_headeru   parentu   open(   u   selfu   requ   authu   tokenu	   challengeu   chalu   auth_valu   resp(    (    u+   /mit/python/lib/python3.0/urllib/request.pyu   retry_http_digest_authm  s    
c             C   sX   d |  j  | t j ƒ  f } | j d ƒ t d ƒ } t j | ƒ j ƒ  } | d  d … S(   Nu	   %s:%s:%s:u   asciii   i   (   u   nonce_countu   timeu   ctimeu   encodeu   randombytesu   hashlibu   sha1u	   hexdigest(   u   selfu   nonceu   su   bu   dig(    (    u+   /mit/python/lib/python3.0/urllib/request.pyu
   get_cnoncey  s    c             C   sV  yK | d } | d } | j  d ƒ } | j  d d ƒ } | j  d d  ƒ } Wn t k
 o d  SYn X|  j | ƒ \ } }	 | d  k o d  S|  j j | | j ƒ  ƒ \ }
 } |
 d  k o d  S| j ƒ  o |  j | j	 ƒ  | ƒ } n d  } d |
 | | f } d | j
 ƒ  | j ƒ  f } | d	 k oc |  j d
 7_ d |  j } |  j | ƒ } d | | | | | | ƒ f } |	 | | ƒ | ƒ } nG | d  k o) |	 | | ƒ d | | | ƒ f ƒ } n t d | ƒ ‚ d |
 | | | j ƒ  | f } | o | d | 7} n | o | d | 7} n | d | 7} | o | d | | f 7} n | S(   Nu   realmu   nonceu   qopu	   algorithmu   MD5u   opaqueu   %s:%s:%su   %s:%su   authi   u   %08xu   %s:%s:%s:%s:%su   qop '%s' is not supported.u>   username="%s", realm="%s", nonce="%s", uri="%s", response="%s"u   , opaque="%s"u   , digest="%s"u   , algorithm="%s"u   , qop=auth, nc=%s, cnonce="%s"(   u   getu   Noneu   KeyErroru   get_algorithm_implsu   passwdu   find_user_passwordu   get_full_urlu   has_datau   get_entity_digestu   get_datau
   get_methodu   get_selectoru   nonce_countu
   get_cnonceu   URLError(   u   selfu   requ   chalu   realmu   nonceu   qopu	   algorithmu   opaqueu   Hu   KDu   useru   pwu   entdigu   A1u   A2u   ncvalueu   cnonceu   noncebitu   respdigu   base(    (    u+   /mit/python/lib/python3.0/urllib/request.pyu   get_authorization„  sP    


!)
c                sM   | d k o d „  ‰  n | d k o d „  ‰  n ‡  f d †  } ˆ  | f S(   Nu   MD5c             S   s   t  j |  j d  ƒ ƒ j ƒ  S(   u   ascii(   u   hashlibu   md5u   encodeu	   hexdigest(   u   x(    (    u+   /mit/python/lib/python3.0/urllib/request.pyu   <lambda>¿  s    u   SHAc             S   s   t  j |  j d  ƒ ƒ j ƒ  S(   u   ascii(   u   hashlibu   sha1u   encodeu	   hexdigest(   u   x(    (    u+   /mit/python/lib/python3.0/urllib/request.pyu   <lambda>Á  s    c                s   ˆ  d  |  | f ƒ S(   u   %s:%s(    (   u   su   d(   u   H(    u+   /mit/python/lib/python3.0/urllib/request.pyu   <lambda>Ã  s    (    (   u   selfu	   algorithmu   KD(    (   u   Hu+   /mit/python/lib/python3.0/urllib/request.pyu   get_algorithm_impls¼  s    c             C   s   d  S(   N(   u   None(   u   selfu   datau   chal(    (    u+   /mit/python/lib/python3.0/urllib/request.pyu   get_entity_digestÆ  s    N(   u   __name__u
   __module__u   Noneu   __init__u   reset_retry_countu   http_error_auth_reqedu   retry_http_digest_authu
   get_cnonceu   get_authorizationu   get_algorithm_implsu   get_entity_digest(   u
   __locals__(    (    u+   /mit/python/lib/python3.0/urllib/request.pyu   AbstractDigestAuthHandlerF  s   
					8	
u   AbstractDigestAuthHandlerc             B   s)   |  Ee  Z d  Z d Z d Z d „  Z d S(   u¨   An authentication protocol defined by RFC 2069

    Digest authentication improves on basic authentication because it
    does not transmit passwords in the clear.
    u   Authorizationiê  c             C   s<   t  | j ƒ  ƒ d } |  j d | | | ƒ } |  j ƒ  | S(   Ni   u   www-authenticate(   u   urlparseu   get_full_urlu   http_error_auth_reqedu   reset_retry_count(   u   selfu   requ   fpu   codeu   msgu   headersu   hostu   retry(    (    u+   /mit/python/lib/python3.0/urllib/request.pyu   http_error_401Õ  s
    	
N(   u   __name__u
   __module__u   __doc__u   auth_headeru   handler_orderu   http_error_401(   u
   __locals__(    (    u+   /mit/python/lib/python3.0/urllib/request.pyu   HTTPDigestAuthHandlerË  s   
u   HTTPDigestAuthHandlerc             B   s#   |  Ee  Z d  Z d Z d „  Z d S(   u   Proxy-Authorizationiê  c             C   s2   | j  ƒ  } |  j d | | | ƒ } |  j ƒ  | S(   Nu   proxy-authenticate(   u   get_hostu   http_error_auth_reqedu   reset_retry_count(   u   selfu   requ   fpu   codeu   msgu   headersu   hostu   retry(    (    u+   /mit/python/lib/python3.0/urllib/request.pyu   http_error_407â  s
    	
N(   u   __name__u
   __module__u   auth_headeru   handler_orderu   http_error_407(   u
   __locals__(    (    u+   /mit/python/lib/python3.0/urllib/request.pyu   ProxyDigestAuthHandlerÝ  s   
u   ProxyDigestAuthHandlerc             B   s5   |  Ee  Z d  d „ Z d „  Z d „  Z d „  Z d S(   i    c             C   s   | |  _  d  S(   N(   u   _debuglevel(   u   selfu
   debuglevel(    (    u+   /mit/python/lib/python3.0/urllib/request.pyu   __init__ë  s    c             C   s   | |  _  d  S(   N(   u   _debuglevel(   u   selfu   level(    (    u+   /mit/python/lib/python3.0/urllib/request.pyu   set_http_debuglevelî  s    c       
      C   sH  | j  ƒ  } | p t d ƒ ‚ n | j ƒ  ob | j ƒ  } | j d ƒ p | j d d ƒ n | j d ƒ p | j d d t | ƒ ƒ q’ n | } | j ƒ  o. t | j	 ƒ  ƒ \ } } t
 | ƒ \ } } n | j d ƒ p | j d | ƒ n xJ |  j j D]< \ } }	 | j ƒ  } | j | ƒ p | j | |	 ƒ qqW| S(   Nu   no host givenu   Content-typeu!   application/x-www-form-urlencodedu   Content-lengthu   %du   Host(   u   get_hostu   URLErroru   has_datau   get_datau
   has_headeru   add_unredirected_headeru   lenu	   has_proxyu	   splittypeu   get_selectoru	   splithostu   parentu
   addheadersu
   capitalize(
   u   selfu   requestu   hostu   datau   sel_hostu   schemeu   selu   sel_pathu   nameu   value(    (    u+   /mit/python/lib/python3.0/urllib/request.pyu   do_request_ñ  s0     c       	      C   s%  | j  ƒ  } | p t d ƒ ‚ n | | d | j ƒ} t | j ƒ } | j | j ƒ d | d <t d „  | j ƒ  Dƒ ƒ } y5 | j | j	 ƒ  | j
 ƒ  | j | ƒ | j ƒ  } Wn6 t j k
 o' } z t | ƒ ‚ WYd d } ~ Xn Xt | j | j | j ƒ  ƒ } | j | _ | j | _ | S(   u¦  Return an addinfourl object for the request, using http_class.

        http_class must implement the HTTPConnection API from http.client.
        The addinfourl return value is a file-like object.  It also
        has methods and attributes including:
            - info(): return a email Message object for the headers
            - geturl(): return the original request URL
            - code: HTTP status code
        u   no host givenu   timeoutu   closeu
   Connectionc             s   s'   |  ] \ } } | j  ƒ  | f Vq d  S(   N(   u   title(   u   .0u   nameu   val(    (    u+   /mit/python/lib/python3.0/urllib/request.pyu	   <genexpr>*  s    N(   u   get_hostu   URLErroru   timeoutu   dictu   headersu   updateu   unredirected_hdrsu   itemsu   requestu
   get_methodu   get_selectoru   datau   getresponseu   socketu   erroru
   addinfourlu   fpu   msgu   get_full_urlu   statusu   codeu   reason(	   u   selfu
   http_classu   requ   hostu   hu   headersu   ru   erru   resp(    (    u+   /mit/python/lib/python3.0/urllib/request.pyu   do_open  s$    

% N(   u   __name__u
   __module__u   __init__u   set_http_debuglevelu   do_request_u   do_open(   u
   __locals__(    (    u+   /mit/python/lib/python3.0/urllib/request.pyu   AbstractHTTPHandleré  s   
		u   AbstractHTTPHandlerc             B   s    |  Ee  Z d  „  Z e j Z d S(   c             C   s   |  j  t j j | ƒ S(   N(   u   do_openu   httpu   clientu   HTTPConnection(   u   selfu   req(    (    u+   /mit/python/lib/python3.0/urllib/request.pyu	   http_open9  s    N(   u   __name__u
   __module__u	   http_openu   AbstractHTTPHandleru   do_request_u   http_request(   u
   __locals__(    (    u+   /mit/python/lib/python3.0/urllib/request.pyu   HTTPHandler7  s   
	u   HTTPHandleru   HTTPSConnectionc             B   s    |  Ee  Z d  „  Z e j Z d S(   c             C   s   |  j  t j j | ƒ S(   N(   u   do_openu   httpu   clientu   HTTPSConnection(   u   selfu   req(    (    u+   /mit/python/lib/python3.0/urllib/request.pyu
   https_openA  s    N(   u   __name__u
   __module__u
   https_openu   AbstractHTTPHandleru   do_request_u   https_request(   u
   __locals__(    (    u+   /mit/python/lib/python3.0/urllib/request.pyu   HTTPSHandler?  s   
	u   HTTPSHandlerc             B   s8   |  Ee  Z d d  „ Z d „  Z d „  Z e Z e Z d S(   c             C   s9   d d  l  } | d  k o | j j ƒ  } n | |  _ d  S(   Ni    (   u   http.cookiejaru   Noneu	   cookiejaru	   CookieJar(   u   selfu	   cookiejaru   http(    (    u+   /mit/python/lib/python3.0/urllib/request.pyu   __init__G  s    c             C   s   |  j  j | ƒ | S(   N(   u	   cookiejaru   add_cookie_header(   u   selfu   request(    (    u+   /mit/python/lib/python3.0/urllib/request.pyu   http_requestM  s    c             C   s   |  j  j | | ƒ | S(   N(   u	   cookiejaru   extract_cookies(   u   selfu   requestu   response(    (    u+   /mit/python/lib/python3.0/urllib/request.pyu   http_responseQ  s    N(   u   __name__u
   __module__u   Noneu   __init__u   http_requestu   http_responseu   https_requestu   https_response(   u
   __locals__(    (    u+   /mit/python/lib/python3.0/urllib/request.pyu   HTTPCookieProcessorF  s
   
		u   HTTPCookieProcessorc             B   s   |  Ee  Z d  „  Z d S(   c             C   s    | j  ƒ  } t d | ƒ ‚ d  S(   Nu   unknown url type: %s(   u   get_typeu   URLError(   u   selfu   requ   type(    (    u+   /mit/python/lib/python3.0/urllib/request.pyu   unknown_openY  s    N(   u   __name__u
   __module__u   unknown_open(   u
   __locals__(    (    u+   /mit/python/lib/python3.0/urllib/request.pyu   UnknownHandlerX  s   
u   UnknownHandlerc             C   ss   i  } xf |  D]^ } | j  d d ƒ \ } } | d d k o% | d d k o | d d … } n | | | <q W| S(   u>   Parse list of key=value strings where keys are not duplicated.u   =i   i    u   "iÿÿÿÿ(   u   split(   u   lu   parsedu   eltu   ku   v(    (    u+   /mit/python/lib/python3.0/urllib/request.pyu   parse_keqv_list]  s     "c             C   sü   g  } d } d } } x½ |  D]µ } | o | | 7} d } q n | oB | d k o d } q n | d k o
 d } n | | 7} q n | d k o | j | ƒ d } q n | d k o
 d } n | | 7} q W| o | j | ƒ n d „  | Dƒ S(   up  Parse lists as described by RFC 2068 Section 2.

    In particular, parse comma-separated lists where the elements of
    the list may include quoted-strings.  A quoted-string could
    contain a comma.  A non-quoted string could have quotes in the
    middle.  Neither commas nor quotes count if they are escaped.
    Only double-quotes count, not single-quotes.
    u    u   \u   "u   ,c             S   s!   g  } |  ] } | | j  ƒ  q
 S(    (   u   strip(   u   .0u   _[1]u   part(    (    u+   /mit/python/lib/python3.0/urllib/request.pyu
   <listcomp>  s    FT(   u   Falseu   Trueu   append(   u   su   resu   partu   escapeu   quoteu   cur(    (    u+   /mit/python/lib/python3.0/urllib/request.pyu   parse_http_listg  s6    	
 



c             B   s/   |  Ee  Z d  „  Z d Z d „  Z d „  Z d S(   c             C   se   | j  ƒ  } | d  d … d k o1 | d d … d k o d | _ |  j j | ƒ S|  j | ƒ Sd  S(   Ni   u   //i   u   /u   ftp(   u   get_selectoru   typeu   parentu   openu   open_local_file(   u   selfu   requ   url(    (    u+   /mit/python/lib/python3.0/urllib/request.pyu	   file_open”  s
    .	c          	   C   su   t  j d  k o^ y+ t j d ƒ t j t j ƒ  ƒ f t  _ Wqn t j k
 o t j d ƒ f t  _ Yqn Xn t  j S(   Nu	   localhost(   u   FileHandleru   namesu   Noneu   socketu   gethostbynameu   gethostnameu   gaierror(   u   self(    (    u+   /mit/python/lib/python3.0/urllib/request.pyu	   get_namesž  s    c             C   sS  d d  l  } d d  l } | j ƒ  } | j ƒ  } t | ƒ } yÑ t j | ƒ } | j } | j j	 | j
 d d ƒ}	 | j | ƒ d }
 | j d |
 p d | |	 f ƒ } | o t | ƒ \ } } n | p! | o7 t | ƒ |  j ƒ  k o t t | d ƒ | d | ƒ SWn3 t k
 o' } z t | ƒ ‚ WYd  d  } ~ Xn Xt d ƒ ‚ d  S(	   Ni    u   usegmtu6   Content-type: %s
Content-length: %d
Last-modified: %s
u
   text/plainu   rbu   file:u   file not on local hostT(   u   email.utilsu	   mimetypesu   get_hostu   get_selectoru   url2pathnameu   osu   statu   st_sizeu   utilsu
   formatdateu   st_mtimeu   Trueu
   guess_typeu   message_from_stringu	   splitportu   _safe_gethostbynameu	   get_namesu
   addinfourlu   openu   OSErroru   URLError(   u   selfu   requ   emailu	   mimetypesu   hostu   fileu	   localfileu   statsu   sizeu   modifiedu   mtypeu   headersu   portu   msg(    (    u+   /mit/python/lib/python3.0/urllib/request.pyu   open_local_file¨  s*    	!" N(   u   __name__u
   __module__u	   file_openu   Noneu   namesu	   get_namesu   open_local_file(   u
   __locals__(    (    u+   /mit/python/lib/python3.0/urllib/request.pyu   FileHandler’  s   
			
u   FileHandlerc             C   s3   y t  j |  ƒ SWn t  j k
 o d  SYn Xd  S(   N(   u   socketu   gethostbynameu   gaierroru   None(   u   host(    (    u+   /mit/python/lib/python3.0/urllib/request.pyu   _safe_gethostbynameÀ  s    c             B   s    |  Ee  Z d  „  Z d „  Z d S(   c             C   s+  d d  l  } d d  l } | j ƒ  } | p t d ƒ ‚ n t | ƒ \ } } | d  k o | j } n t | ƒ } t | ƒ \ } } | o t	 | ƒ \ } } n d  } t
 | ƒ } t
 | p d ƒ } t
 | p d ƒ } y t j | ƒ } Wn6 t j k
 o' } z t | ƒ ‚ WYd  d  } ~ Xn Xt | j ƒ  ƒ \ }	 }
 |	 j d ƒ } t t t
 | ƒ ƒ } | d  d … | d } } | o  | d o | d d  … } n y-|  j | | | | | | j ƒ } | o d p d } xP |
 D]H } t | ƒ \ } } | j ƒ  d	 k o | d k o | j ƒ  } qãqãW| j | | ƒ \ } } d } | j | j ƒ  ƒ d } | o | d | 7} n | d  k	 o | d k o | d | 7} n t j | ƒ } t | | | j ƒ  ƒ SWnS | j k
 oD } z. t d | ƒ } | j t  j! ƒ  d ƒ ‚ WYd  d  } ~ Xn Xd  S(   Ni    u   ftp error: no host givenu    u   /iÿÿÿÿi   u   Iu   Du   typeu   au   Au   iu   du   Content-type: %s
u   Content-length: %d
u   ftp error: %si   (   u   au   Au   iu   Iu   du   D("   u   ftplibu	   mimetypesu   get_hostu   URLErroru	   splitportu   Noneu   FTP_PORTu   intu	   splituseru   splitpasswdu   unquoteu   socketu   gethostbynameu   erroru	   splitattru   get_selectoru   splitu   listu   mapu   connect_ftpu   timeoutu
   splitvalueu   loweru   upperu   retrfileu
   guess_typeu   get_full_urlu   emailu   message_from_stringu
   addinfourlu
   all_errorsu   with_tracebacku   sysu   exc_info(   u   selfu   requ   ftplibu	   mimetypesu   hostu   portu   useru   passwdu   msgu   pathu   attrsu   dirsu   fileu   fwu   typeu   attru   valueu   fpu   retrlenu   headersu   mtypeu   exc(    (    u+   /mit/python/lib/python3.0/urllib/request.pyu   ftp_openÇ  s^     ! c             C   s   t  | | | | | | ƒ } | S(   N(   u
   ftpwrapper(   u   selfu   useru   passwdu   hostu   portu   dirsu   timeoutu   fw(    (    u+   /mit/python/lib/python3.0/urllib/request.pyu   connect_ftpü  s    N(   u   __name__u
   __module__u   ftp_openu   connect_ftp(   u
   __locals__(    (    u+   /mit/python/lib/python3.0/urllib/request.pyu
   FTPHandlerÆ  s   
	5u
   FTPHandlerc             B   s;   |  Ee  Z d  „  Z d „  Z d „  Z d „  Z d „  Z d S(   c             C   s1   i  |  _  i  |  _ d |  _ d |  _ d |  _ d  S(   Ni    i<   i   (   u   cacheu   timeoutu   soonestu   delayu	   max_conns(   u   self(    (    u+   /mit/python/lib/python3.0/urllib/request.pyu   __init__  s
    				c             C   s   | |  _  d  S(   N(   u   delay(   u   selfu   t(    (    u+   /mit/python/lib/python3.0/urllib/request.pyu
   setTimeout
  s    c             C   s   | |  _  d  S(   N(   u	   max_conns(   u   selfu   m(    (    u+   /mit/python/lib/python3.0/urllib/request.pyu   setMaxConns  s    c             C   s   | | | d j  | ƒ | f } | |  j k o t j ƒ  |  j |  j | <n= t | | | | | | ƒ |  j | <t j ƒ  |  j |  j | <|  j ƒ  |  j | S(   Nu   /(   u   joinu   cacheu   timeu   delayu   timeoutu
   ftpwrapperu   check_cache(   u   selfu   useru   passwdu   hostu   portu   dirsu   timeoutu   key(    (    u+   /mit/python/lib/python3.0/urllib/request.pyu   connect_ftp  s    
c             C   s(  t  j  ƒ  } |  j | k o` x] t |  j j ƒ  ƒ D]B \ } } | | k  o) |  j | j ƒ  |  j | =|  j | =q2 q2 Wn t t |  j j ƒ  ƒ ƒ |  _ t	 |  j ƒ |  j
 k oq xL t |  j j ƒ  ƒ D]5 \ } } | |  j k o |  j | =|  j | =PqÉ qÉ Wt t |  j j ƒ  ƒ ƒ |  _ n d  S(   N(   u   timeu   soonestu   listu   timeoutu   itemsu   cacheu   closeu   minu   valuesu   lenu	   max_conns(   u   selfu   tu   ku   v(    (    u+   /mit/python/lib/python3.0/urllib/request.pyu   check_cache  s"     
 

	N(   u   __name__u
   __module__u   __init__u
   setTimeoutu   setMaxConnsu   connect_ftpu   check_cache(   u
   __locals__(    (    u+   /mit/python/lib/python3.0/urllib/request.pyu   CacheFTPHandler   s
   
				u   CacheFTPHandleri
   u   mac(   u   url2pathnameu   pathname2urlu   ntc             C   s
   t  |  ƒ S(   u   OS-specific conversion from a relative URL of the 'file' scheme
        to a file system path; not recommended for general use.(   u   unquote(   u   pathname(    (    u+   /mit/python/lib/python3.0/urllib/request.pyu   url2pathname9  s    c             C   s
   t  |  ƒ S(   u   OS-specific conversion from a file system path to a relative URL
        of the 'file' scheme; not recommended for general use.(   u   quote(   u   pathname(    (    u+   /mit/python/lib/python3.0/urllib/request.pyu   pathname2url>  s    c             B   sû   |  Ee  Z d  Z d Z d e Z d d „ Z d „  Z d „  Z	 d „  Z
 d „  Z d d „ Z d d „ Z d d	 „ Z d d d d
 „ Z d „  Z d d „ Z d d „ Z d „  Z e o d „  Z d d „ Z n d „  Z d „  Z d „  Z d d „ Z d S(   u,  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).u   Python-urllib/%sc             K   s‡   | d  k o t ƒ  } n | |  _ | j d ƒ |  _ | j d ƒ |  _ d |  j f g |  _ g  |  _ t	 j
 |  _ d  |  _ t |  _ d  S(   Nu   key_fileu	   cert_fileu
   User-Agent(   u   Noneu
   getproxiesu   proxiesu   getu   key_fileu	   cert_fileu   versionu
   addheadersu   _URLopener__tempfilesu   osu   unlinku   _URLopener__unlinku	   tempcacheu   ftpcache(   u   selfu   proxiesu   x509(    (    u+   /mit/python/lib/python3.0/urllib/request.pyu   __init__X  s    			c             C   s   |  j  ƒ  d  S(   N(   u   close(   u   self(    (    u+   /mit/python/lib/python3.0/urllib/request.pyu   __del__o  s    c             C   s   |  j  ƒ  d  S(   N(   u   cleanup(   u   self(    (    u+   /mit/python/lib/python3.0/urllib/request.pyu   closer  s    c          	   C   sy   |  j  oP x9 |  j  D]. } y |  j | ƒ Wq t k
 o Yq Xq W|  j  d  d  … =n |  j o |  j j ƒ  n d  S(   N(   u   _URLopener__tempfilesu   _URLopener__unlinku   OSErroru	   tempcacheu   clear(   u   selfu   file(    (    u+   /mit/python/lib/python3.0/urllib/request.pyu   cleanupu  s    

 

c             G   s   |  j  j | ƒ d S(   ud   Add a header to be used by the HTTP interface only
        e.g. u.addheader('Accept', 'sound/basic')N(   u
   addheadersu   append(   u   selfu   args(    (    u+   /mit/python/lib/python3.0/urllib/request.pyu	   addheaderƒ  s    c             C   sË  t  t | ƒ ƒ } |  j oC | |  j k o3 |  j | \ } } t | d ƒ } t | | | ƒ St | ƒ \ } } | p
 d } n | |  j k oA |  j | } t | ƒ \ } }	 t |	 ƒ \ }
 } |
 | f } n d } d | } | |  _	 | j
 d d ƒ } t |  | ƒ p/ | o |  j | | | ƒ S|  j | | ƒ Sn y; | d k o t |  | ƒ | ƒ St |  | ƒ | | ƒ SWnL t j k
 o= } z' t d | ƒ j t j ƒ  d ƒ ‚ WYd d } ~ Xn Xd S(	   u6   Use URLopener().open(file) instead of open(file, 'r').u   rbu   fileu   open_u   -u   _u   socket errori   N(   u   unwrapu   to_bytesu	   tempcacheu   openu
   addinfourlu	   splittypeu   proxiesu	   splithostu   Noneu   typeu   replaceu   hasattru   open_unknown_proxyu   open_unknownu   getattru   socketu   erroru   IOErroru   with_tracebacku   sysu   exc_info(   u   selfu   fullurlu   datau   filenameu   headersu   fpu   urltypeu   urlu   proxyu	   proxyhostu   hostu   selectoru   nameu   msg(    (    u+   /mit/python/lib/python3.0/urllib/request.pyu   open‰  s6    

	c             C   s(   t  | ƒ \ } } t d d | ƒ ‚ d S(   u/   Overridable interface to open unknown URL type.u	   url erroru   unknown url typeN(   u	   splittypeu   IOError(   u   selfu   fullurlu   datau   typeu   url(    (    u+   /mit/python/lib/python3.0/urllib/request.pyu   open_unknownª  s    c             C   s,   t  | ƒ \ } } t d d | | ƒ ‚ d S(   u/   Overridable interface to open unknown URL type.u	   url erroru   invalid proxy for %sN(   u	   splittypeu   IOError(   u   selfu   proxyu   fullurlu   datau   typeu   url(    (    u+   /mit/python/lib/python3.0/urllib/request.pyu   open_unknown_proxy¯  s    c             C   sý  t  t | ƒ ƒ } |  j o | |  j k o |  j | St | ƒ \ } } | d k o | p | d k oj y< |  j | ƒ } | j ƒ  } ~ t t | ƒ d ƒ | f SWqÖ t	 k
 o }	 z WYd d }	 ~	 XqÖ Xn |  j
 | | ƒ } | j ƒ  }
 | o t
 | d ƒ } n· d d l } t | ƒ \ } } t | p d ƒ \ } } t | p d ƒ \ } } t | p d ƒ \ } } t j j | ƒ d } | j | ƒ \ } } |  j j | ƒ t j | d ƒ } | |
 f } |  j d k	 o | |  j | <n d } d	 } d } d } | o5 d
 |
 k o t |
 d ƒ } n | | | | ƒ n x` | j | ƒ } | p Pn | t | ƒ 7} | j | ƒ | d 7} | o | | | | ƒ qHqH| j ƒ  | j ƒ  ~ ~ | d k o* | | k  o t d | | f | ƒ ‚ n | S(   ut   retrieve(url) returns (filename, headers) for a local object
        or (tempfilename, headers) for a remote object.u   filei   Nu   wbi    u    i   i   iÿÿÿÿu   content-lengthu   Content-Lengthu1   retrieval incomplete: got only %i out of %i bytesi    (   u   unwrapu   to_bytesu	   tempcacheu	   splittypeu   Noneu   open_local_fileu   infou   url2pathnameu	   splithostu   IOErroru   openu   tempfileu
   splitqueryu	   splitattru   osu   pathu   splitextu   mkstempu   _URLopener__tempfilesu   appendu   fdopenu   intu   readu   lenu   writeu   closeu   ContentTooShortError(   u   selfu   urlu   filenameu
   reporthooku   datau   typeu   url1u   fpu   hdrsu   msgu   headersu   tfpu   tempfileu   garbageu   pathu   suffixu   fdu   resultu   bsu   sizeu   readu   blocknumu   block(    (    u+   /mit/python/lib/python3.0/urllib/request.pyu   retrieveµ  sl    "


c             C   s  d } d } t | t ƒ oE t | ƒ \ } } | o" t | ƒ \ } } t | ƒ } n | } n¾ | \ } } t | ƒ \ } } t | ƒ \ }	 }
 |
 } d } |	 j ƒ  d k o
 d } ne t |
 ƒ \ } }
 | o t | ƒ \ } } n | o d |	 | |
 f } n t | ƒ o
 | } n | p t	 d d ƒ ‚ n | o% d d l
 } | j | ƒ j ƒ  } n d } | o% d d l
 } | j | ƒ j ƒ  } n d } | | ƒ } d | _ d | _ i  } | o d	 | | d
 <n | o d	 | | d <n | o | | d <n x! |  j D] \ } } | | | <qW| d k	 o$ d | d <| j d | | | ƒ n | j d | d | ƒy | j ƒ  } Wn& t j j k
 o t d ƒ ‚ Yn Xd | j k o
 d k  n o! t | j | j d | | j ƒ S|  j | | j | j | j | j | ƒ Sd S(   u‘  Make an HTTP connection using connection_class.

        This is an internal method that should be called from
        open_http() or open_https().

        Arguments:
        - connection_factory should take a host name and return an
          HTTPConnection instance.
        - url is the url to retrieval or a host, relative-path pair.
        - data is payload for a POST request or None.
        u   httpu	   %s://%s%su
   http erroru   no host giveni    Ni
   u   HTTP/1.0u   Basic %su   Proxy-Authorizationu   Authorizationu   Hostu!   application/x-www-form-urlencodedu   Content-Typeu   POSTu   GETu   headersu$   http protocol error: bad status lineiÈ   i,  u   http:(   u   Noneu
   isinstanceu   stru	   splithostu	   splituseru   unquoteu	   splittypeu   loweru   proxy_bypassu   IOErroru   base64u	   b64encodeu   stripu	   _http_vsnu   _http_vsn_stru
   addheadersu   requestu   getresponseu   httpu   clientu   BadStatusLineu   URLErroru   statusu
   addinfourlu   fpu   msgu
   http_erroru   reason(   u   selfu   connection_factoryu   urlu   datau   user_passwdu   proxy_passwdu   hostu   selectoru   realhostu   urltypeu   restu   base64u
   proxy_authu   authu	   http_connu   headersu   headeru   valueu   response(    (    u+   /mit/python/lib/python3.0/urllib/request.pyu   _open_generic_httpõ  sv    


 		
 
!	c             C   s   |  j  t j j | | ƒ S(   u   Use HTTP protocol.(   u   _open_generic_httpu   httpu   clientu   HTTPConnection(   u   selfu   urlu   data(    (    u+   /mit/python/lib/python3.0/urllib/request.pyu	   open_httpP  s    c       
      C   s–   d | } t  |  | ƒ oc t |  | ƒ } | d k o | | | | | | ƒ }	 n | | | | | | | ƒ }	 |	 o |	 Sn |  j | | | | | ƒ S(   uœ   Handle http errors.

        Derived class can override this, or provide specific handlers
        named http_error_DDD where DDD is the 3-digit error code.u   http_error_%dN(   u   hasattru   getattru   Noneu   http_error_default(
   u   selfu   urlu   fpu   errcodeu   errmsgu   headersu   datau   nameu   methodu   result(    (    u+   /mit/python/lib/python3.0/urllib/request.pyu
   http_errorT  s    
 	c             C   s2   | j  ƒ  } | j ƒ  t | | | | d ƒ ‚ d S(   u>   Default error handler: close the connection and raise IOError.N(   u   readu   closeu	   HTTPErroru   None(   u   selfu   urlu   fpu   errcodeu   errmsgu   headersu   void(    (    u+   /mit/python/lib/python3.0/urllib/request.pyu   http_error_defaultd  s    
c             C   s"   t  j j | d |  j d |  j ƒS(   Nu   key_fileu	   cert_file(   u   httpu   clientu   HTTPSConnectionu   key_fileu	   cert_file(   u   selfu   host(    (    u+   /mit/python/lib/python3.0/urllib/request.pyu   _https_connectionk  s    	c             C   s   |  j  |  j | | ƒ S(   u   Use HTTPS protocol.(   u   _open_generic_httpu   _https_connection(   u   selfu   urlu   data(    (    u+   /mit/python/lib/python3.0/urllib/request.pyu
   open_httpsp  s    c             C   s   t  | t ƒ p t d d ƒ ‚ n | d d … d k oB | d d … d k o+ | d d … j ƒ  d	 k o |  j | ƒ S|  j | ƒ Sd S(
   u/   Use local file or FTP depending on form of URL.u
   file erroru9   proxy support for file protocol currently not implementedNi   u   //i   u   /i   u
   localhost/(   u
   isinstanceu   stru   URLErroru   loweru   open_ftpu   open_local_file(   u   selfu   url(    (    u+   /mit/python/lib/python3.0/urllib/request.pyu	   open_filet  s
    Kc             C   sØ  d d l  } d d l } d d l m } t | ƒ \ } } t | ƒ } y t j | ƒ } WnB t k
 o6 }	 z  t	 |	 j
 |	 j |	 j ƒ ‚ WYd d }	 ~	 Xn X| j }
 | j j | j d d ƒ} | j | ƒ d } | j d | p d |
 | f ƒ } | pE | } | d d … d k o d	 | } n t t | d
 ƒ | | ƒ St | ƒ \ } } | og t j | ƒ t ƒ  t ƒ  f k oE | } | d d … d k o d	 | } n t t | d
 ƒ | | ƒ St	 d d ƒ ‚ d S(   u   Use local file.i    N(   u   StringIOu   usegmtu6   Content-Type: %s
Content-Length: %d
Last-modified: %s
u
   text/plaini   u   /u   file://u   rbu   local file erroru   not on local hostT(   u	   mimetypesu   email.utilsu   iou   StringIOu	   splithostu   url2pathnameu   osu   statu   OSErroru   URLErroru   errnou   strerroru   filenameu   st_sizeu   utilsu
   formatdateu   st_mtimeu   Trueu
   guess_typeu   message_from_stringu
   addinfourlu   openu	   splitportu   socketu   gethostbynameu	   localhostu   thishost(   u   selfu   urlu	   mimetypesu   emailu   StringIOu   hostu   fileu	   localnameu   statsu   eu   sizeu   modifiedu   mtypeu   headersu   urlfileu   port(    (    u+   /mit/python/lib/python3.0/urllib/request.pyu   open_local_file}  s6    /	"c             C   sÈ  t  | t ƒ p t d d ƒ ‚ n d d l } d d l m } t | ƒ \ } } | p t d d ƒ ‚ n t | ƒ \ } } t | ƒ \ } } | o t	 | ƒ \ } } n d } t | ƒ } t | p d ƒ } t | p d ƒ } t j | ƒ } | p d d l }	 |	 j } n t | ƒ } t | ƒ \ } }
 t | ƒ } | j d ƒ } | d d	 … | d	 } } | o  | d o | d
 d … } n | o | d o d | d <n | | | d j | ƒ f } t |  j ƒ t k oP xM |  j j ƒ  D]8 } | | k o% |  j | } |  j | =| j ƒ  qðqðWn yE| |  j k o# t | | | | | ƒ |  j | <n | p
 d } n d } xP |
 D]H } t | ƒ \ } } | j ƒ  d k o | d k o | j ƒ  } q„q„W|  j | j | | ƒ \ } } | j d | ƒ d } d } | o | d | 7} n | d k	 o | d k o | d | 7} n t j  | ƒ } t! | | d | ƒ SWnL t" ƒ  k
 o= } z' t d | ƒ j# t$ j% ƒ  d ƒ ‚ WYd d } ~ Xn Xd S(   u   Use FTP protocol.u	   ftp erroru8   proxy support for ftp protocol currently not implementedi    N(   u   StringIOu   no host givenu    u   /iÿÿÿÿi   u   Du   Iu   typeu   au   Au   iu   du   ftp:u   Content-Type: %s
u   Content-Length: %d
i   (   u   au   Au   iu   Iu   du   D(&   u
   isinstanceu   stru   URLErroru	   mimetypesu   iou   StringIOu	   splithostu	   splitportu	   splituseru   splitpasswdu   Noneu   unquoteu   socketu   gethostbynameu   ftplibu   FTP_PORTu   intu	   splitattru   splitu   joinu   lenu   ftpcacheu   MAXFTPCACHEu   keysu   closeu
   ftpwrapperu
   splitvalueu   loweru   upperu   retrfileu
   guess_typeu   emailu   message_from_stringu
   addinfourlu	   ftperrorsu   with_tracebacku   sysu   exc_info(   u   selfu   urlu	   mimetypesu   StringIOu   hostu   pathu   portu   useru   passwdu   ftplibu   attrsu   dirsu   fileu   keyu   ku   vu   typeu   attru   valueu   fpu   retrlenu   mtypeu   headersu   msg(    (    u+   /mit/python/lib/python3.0/urllib/request.pyu   open_ftp›  sv         
# 
 c       
      C   sÀ  t  | t ƒ p t d d ƒ ‚ n y | j d d ƒ \ } } Wn# t k
 o t d d ƒ ‚ Yn X| p
 d } n | j d ƒ } | d k o? d	 | | d
 … k o( | | d d
 … } | d
 | … } n d } g  } | j d t j	 d t j
 t j ƒ  ƒ ƒ ƒ | j d | ƒ | d k o d d
 l } | j | ƒ } n t | ƒ } | j d t | ƒ ƒ | j d ƒ | j | ƒ d j | ƒ } t j | ƒ } t j | ƒ }	 t |	 | | ƒ S(   u   Use "data" URL.u
   data erroru9   proxy support for data protocol currently not implementedu   ,i   u   bad data URLu   text/plain;charset=US-ASCIIu   ;i    u   =Nu    u   Date: %su   %a, %d %b %Y %T GMTu   Content-type: %su   base64u   Content-Length: %du   
(   u
   isinstanceu   stru   URLErroru   splitu
   ValueErroru   IOErroru   rfindu   appendu   timeu   strftimeu   gmtimeu   base64u   decodestringu   unquoteu   lenu   joinu   emailu   message_from_stringu   iou   StringIOu
   addinfourl(
   u   selfu   urlu   datau   typeu   semiu   encodingu   msgu   base64u   headersu   f(    (    u+   /mit/python/lib/python3.0/urllib/request.pyu	   open_dataÖ  s8    
$N(   u   __name__u
   __module__u   __doc__u   Noneu   _URLopener__tempfilesu   __version__u   versionu   __init__u   __del__u   closeu   cleanupu	   addheaderu   openu   open_unknownu   open_unknown_proxyu   retrieveu   _open_generic_httpu	   open_httpu
   http_erroru   http_error_defaultu	   _have_sslu   _https_connectionu
   open_httpsu	   open_fileu   open_local_fileu   open_ftpu	   open_data(   u
   __locals__(    (    u+   /mit/python/lib/python3.0/urllib/request.pyu	   URLopenerK  s.   

				!@	[						;u	   URLopenerc             B   s¼   |  Ee  Z d  Z d „  Z d „  Z d d „ Z d „  Z d d „ Z d d „ Z	 d d „ Z
 d d „ Z d d	 „ Z d d
 „ Z d d „ Z d d „ Z d d „ Z d d „ Z d „  Z d S(   u?   Derived class with handlers for errors we can handle (perhaps).c             O   s2   t  j |  | | Ž i  |  _ d |  _ d |  _ d  S(   Ni    i
   (   u	   URLopeneru   __init__u
   auth_cacheu   triesu   maxtries(   u   selfu   argsu   kwargs(    (    u+   /mit/python/lib/python3.0/urllib/request.pyu   __init__  s    		c             C   s   t  | | d | | ƒ S(   u3   Default error handling -- don't raise an exception.u   http:(   u
   addinfourl(   u   selfu   urlu   fpu   errcodeu   errmsgu   headers(    (    u+   /mit/python/lib/python3.0/urllib/request.pyu   http_error_default	  s    c       	      C   s   |  j  d 7_  |  j oY |  j  |  j k oF t |  d ƒ o |  j } n
 |  j } d |  _  | | | d d | ƒ S|  j | | | | | | ƒ } d |  _  | S(   u%   Error 302 -- relocated (temporarily).i   u   http_error_500i    iô  u)   Internal Server Error: Redirect Recursion(   u   triesu   maxtriesu   hasattru   http_error_500u   http_error_defaultu   redirect_internal(	   u   selfu   urlu   fpu   errcodeu   errmsgu   headersu   datau   methu   result(    (    u+   /mit/python/lib/python3.0/urllib/request.pyu   http_error_302  s    				c       	      C   sw   d | k o | d } n  d | k o | d } n d  S| j  ƒ  } | j ƒ  t |  j d | | ƒ } |  j | ƒ S(   Nu   locationu   uriu   :(   u   readu   closeu   urljoinu   typeu   open(	   u   selfu   urlu   fpu   errcodeu   errmsgu   headersu   datau   newurlu   void(    (    u+   /mit/python/lib/python3.0/urllib/request.pyu   redirect_internal  s    
c             C   s   |  j  | | | | | | ƒ S(   u*   Error 301 -- also relocated (permanently).(   u   http_error_302(   u   selfu   urlu   fpu   errcodeu   errmsgu   headersu   data(    (    u+   /mit/python/lib/python3.0/urllib/request.pyu   http_error_301*  s    c             C   s   |  j  | | | | | | ƒ S(   u;   Error 303 -- also relocated (essentially identical to 302).(   u   http_error_302(   u   selfu   urlu   fpu   errcodeu   errmsgu   headersu   data(    (    u+   /mit/python/lib/python3.0/urllib/request.pyu   http_error_303.  s    c             C   sG   | d k o |  j | | | | | | ƒ S|  j | | | | | ƒ Sd S(   u1   Error 307 -- relocated, but turn POST into error.N(   u   Noneu   http_error_302u   http_error_default(   u   selfu   urlu   fpu   errcodeu   errmsgu   headersu   data(    (    u+   /mit/python/lib/python3.0/urllib/request.pyu   http_error_3072  s    c             C   s  d | k o  t  j |  | | | | | ƒ n | d } d d l } | j d | ƒ }	 |	 p  t  j |  | | | | | ƒ n |	 j ƒ  \ }
 } |
 j ƒ  d k o  t  j |  | | | | | ƒ n d |  j d } | d k o t |  | ƒ | | ƒ St |  | ƒ | | | ƒ Sd S(   u_   Error 401 -- authentication required.
        This function supports Basic authentication only.u   www-authenticatei    Nu!   [ 	]*([^ 	]+)[ 	]+realm="([^"]*)"u   basicu   retry_u   _basic_auth(	   u	   URLopeneru   http_error_defaultu   reu   matchu   groupsu   loweru   typeu   Noneu   getattr(   u   selfu   urlu   fpu   errcodeu   errmsgu   headersu   datau   stuffu   reu   matchu   schemeu   realmu   name(    (    u+   /mit/python/lib/python3.0/urllib/request.pyu   http_error_4019  s"    
c             C   s  d | k o  t  j |  | | | | | ƒ n | d } d d l } | j d | ƒ }	 |	 p  t  j |  | | | | | ƒ n |	 j ƒ  \ }
 } |
 j ƒ  d k o  t  j |  | | | | | ƒ n d |  j d } | d k o t |  | ƒ | | ƒ St |  | ƒ | | | ƒ Sd S(   ue   Error 407 -- proxy authentication required.
        This function supports Basic authentication only.u   proxy-authenticatei    Nu!   [ 	]*([^ 	]+)[ 	]+realm="([^"]*)"u   basicu   retry_proxy_u   _basic_auth(	   u	   URLopeneru   http_error_defaultu   reu   matchu   groupsu   loweru   typeu   Noneu   getattr(   u   selfu   urlu   fpu   errcodeu   errmsgu   headersu   datau   stuffu   reu   matchu   schemeu   realmu   name(    (    u+   /mit/python/lib/python3.0/urllib/request.pyu   http_error_407O  s"    
c             C   s  t  | ƒ \ } } d | | } |  j d } t | ƒ \ } }	 t  |	 ƒ \ }	 }
 |	 j d ƒ d } |	 | d  … }	 |  j |	 | | ƒ \ } } | p | p d  Sd t | d d ƒt | d d ƒ|	 f }	 d |	 |
 |  j d <| d  k o |  j | ƒ S|  j | | ƒ Sd  S(   Nu   http://u   httpu   @i   u   %s:%s@%su   safeu    (   u	   splithostu   proxiesu	   splittypeu   findu   get_user_passwdu   Noneu   quoteu   open(   u   selfu   urlu   realmu   datau   hostu   selectoru   newurlu   proxyu   urltypeu	   proxyhostu   proxyselectoru   iu   useru   passwd(    (    u+   /mit/python/lib/python3.0/urllib/request.pyu   retry_proxy_http_basic_authe  s      c             C   s  t  | ƒ \ } } d | | } |  j d } t | ƒ \ } }	 t  |	 ƒ \ }	 }
 |	 j d ƒ d } |	 | d  … }	 |  j |	 | | ƒ \ } } | p | p d  Sd t | d d ƒt | d d ƒ|	 f }	 d |	 |
 |  j d <| d  k o |  j | ƒ S|  j | | ƒ Sd  S(   Nu   https://u   httpsu   @i   u   %s:%s@%su   safeu    (   u	   splithostu   proxiesu	   splittypeu   findu   get_user_passwdu   Noneu   quoteu   open(   u   selfu   urlu   realmu   datau   hostu   selectoru   newurlu   proxyu   urltypeu	   proxyhostu   proxyselectoru   iu   useru   passwd(    (    u+   /mit/python/lib/python3.0/urllib/request.pyu   retry_proxy_https_basic_authw  s      c       
      C   sË   t  | ƒ \ } } | j d ƒ d } | | d  … } |  j | | | ƒ \ } } | p | p d  Sd t | d d ƒt | d d ƒ| f } d | | }	 | d  k o |  j |	 ƒ S|  j |	 | ƒ Sd  S(   Nu   @i   u   %s:%s@%su   safeu    u   http://(   u	   splithostu   findu   get_user_passwdu   Noneu   quoteu   open(
   u   selfu   urlu   realmu   datau   hostu   selectoru   iu   useru   passwdu   newurl(    (    u+   /mit/python/lib/python3.0/urllib/request.pyu   retry_http_basic_auth‰  s     c       
      C   sË   t  | ƒ \ } } | j d ƒ d } | | d  … } |  j | | | ƒ \ } } | p | p d  Sd t | d d ƒt | d d ƒ| f } d | | }	 | d  k o |  j |	 ƒ S|  j |	 | ƒ Sd  S(   Nu   @i   u   %s:%s@%su   safeu    u   https://(   u	   splithostu   findu   get_user_passwdu   Noneu   quoteu   open(
   u   selfu   urlu   realmu   datau   hostu   selectoru   iu   useru   passwdu   newurl(    (    u+   /mit/python/lib/python3.0/urllib/request.pyu   retry_https_basic_auth—  s     i    c             C   s   | d | j  ƒ  } | |  j k o$ | o |  j | =qH |  j | Sn |  j | | ƒ \ } } | p | o | | f |  j | <n | | f S(   Nu   @(   u   loweru
   auth_cacheu   prompt_user_passwd(   u   selfu   hostu   realmu   clear_cacheu   keyu   useru   passwd(    (    u+   /mit/python/lib/python3.0/urllib/request.pyu   get_user_passwd¥  s     c             C   sr   d d l  } y@ t d | | f ƒ } | j  d | | | f ƒ } | | f SWn t k
 o t ƒ  d SYn Xd S(   u#   Override this in a GUI environment!i    Nu   Enter username for %s at %s: u#   Enter password for %s in %s at %s: (   NN(   u   getpassu   inputu   KeyboardInterruptu   printu   None(   u   selfu   hostu   realmu   getpassu   useru   passwd(    (    u+   /mit/python/lib/python3.0/urllib/request.pyu   prompt_user_passwd°  s    	N(   u   __name__u
   __module__u   __doc__u   __init__u   http_error_defaultu   Noneu   http_error_302u   redirect_internalu   http_error_301u   http_error_303u   http_error_307u   http_error_401u   http_error_407u   retry_proxy_http_basic_authu   retry_proxy_https_basic_authu   retry_http_basic_authu   retry_https_basic_authu   get_user_passwdu   prompt_user_passwd(   u
   __locals__(    (    u+   /mit/python/lib/python3.0/urllib/request.pyu   FancyURLopener   s    
			u   FancyURLopenerc               C   s$   t  d k o t j d ƒ a  n t  S(   u8   Return the IP address of the magic hostname 'localhost'.u	   localhostN(   u
   _localhostu   Noneu   socketu   gethostbyname(    (    (    u+   /mit/python/lib/python3.0/urllib/request.pyu	   localhostÀ  s    c               C   s*   t  d k o t j t j ƒ  ƒ a  n t  S(   u*   Return the IP address of the current host.N(   u	   _thishostu   Noneu   socketu   gethostbynameu   gethostname(    (    (    u+   /mit/python/lib/python3.0/urllib/request.pyu   thishostÈ  s    c              C   s*   t  d k o d d l }  |  j a  n t  S(   u1   Return the set of errors raised by the FTP class.i    N(   u
   _ftperrorsu   Noneu   ftplibu
   all_errors(   u   ftplib(    (    u+   /mit/python/lib/python3.0/urllib/request.pyu	   ftperrorsÐ  s    c               C   s$   t  d k o t j d ƒ a  n t  S(   u%   Return an empty email Message object.u    N(   u
   _noheadersu   Noneu   emailu   message_from_string(    (    (    u+   /mit/python/lib/python3.0/urllib/request.pyu	   noheadersÙ  s    c             B   sD   |  Ee  Z d  Z d d „ Z d „  Z d „  Z d „  Z d „  Z d S(   u;   Class used by open_ftp() for cache of open FTP connections.c             C   sD   | |  _  | |  _ | |  _ | |  _ | |  _ | |  _ |  j ƒ  d  S(   N(   u   useru   passwdu   hostu   portu   dirsu   timeoutu   init(   u   selfu   useru   passwdu   hostu   portu   dirsu   timeout(    (    u+   /mit/python/lib/python3.0/urllib/request.pyu   __init__æ  s    						c             C   s„   d d  l  } d |  _ | j ƒ  |  _ |  j j |  j |  j |  j ƒ |  j j |  j	 |  j
 ƒ x! |  j D] } |  j j | ƒ qf Wd  S(   Ni    (   u   ftplibu   busyu   FTPu   ftpu   connectu   hostu   portu   timeoutu   loginu   useru   passwdu   dirsu   cwd(   u   selfu   ftplibu   dir(    (    u+   /mit/python/lib/python3.0/urllib/request.pyu   initï  s    	
 c       	   "   C   s&  d d  l  } |  j ƒ  | d k o d } d } n d | } d } y |  j j | ƒ Wn1 | j k
 o" |  j ƒ  |  j j | ƒ Yn Xd  } | oœ | o” y  d | } |  j j | ƒ } Wq4| j k
 o^ } zH t	 | ƒ d  d … d	 k o& t
 d
 | ƒ j t j ƒ  d ƒ ‚ n WYd  d  } ~ Xq4Xn | p» |  j j d ƒ | oˆ |  j j ƒ  } zW y |  j j | ƒ Wn< | j k
 o- } z t
 d
 | ƒ | ‚ WYd  d  } ~ Xn XWd  |  j j | ƒ Xd | } n d } |  j j | ƒ } n d |  _ t | d j d ƒ |  j ƒ | d f S(   Ni    u   du   Du   TYPE Ai   u   TYPE u   RETR i   u   550u	   ftp errori   u   LIST u   LISTu   rb(   u   du   D(   u   ftplibu   endtransferu   ftpu   voidcmdu
   all_errorsu   initu   Noneu   ntransfercmdu
   error_permu   stru   URLErroru   with_tracebacku   sysu   exc_infou   pwdu   cwdu   busyu   addclosehooku   makefile(	   u   selfu   fileu   typeu   ftplibu   cmdu   isdiru   connu   reasonu   pwd(    (    u+   /mit/python/lib/python3.0/urllib/request.pyu   retrfileø  sH    
  

 

/*	c             C   sG   |  j  p d  Sd |  _  y |  j j ƒ  Wn t ƒ  k
 o Yn Xd  S(   Ni    (   u   busyu   ftpu   voidrespu	   ftperrors(   u   self(    (    u+   /mit/python/lib/python3.0/urllib/request.pyu   endtransfer   s    
	c             C   s9   |  j  ƒ  y |  j j ƒ  Wn t ƒ  k
 o Yn Xd  S(   N(   u   endtransferu   ftpu   closeu	   ftperrors(   u   self(    (    u+   /mit/python/lib/python3.0/urllib/request.pyu   close)  s
    
N(	   u   __name__u
   __module__u   __doc__u   Noneu   __init__u   initu   retrfileu   endtransferu   close(   u
   __locals__(    (    u+   /mit/python/lib/python3.0/urllib/request.pyu
   ftpwrapperã  s   
				(		u
   ftpwrapperc              C   sl   i  }  x_ t  j j ƒ  D]N \ } } | j ƒ  } | o/ | d d … d k o | |  | d d … <q q W|  S(   u  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úÿÿÿNu   _proxy(   u   osu   environu   itemsu   lower(   u   proxiesu   nameu   value(    (    u+   /mit/python/lib/python3.0/urllib/request.pyu   getproxies_environment1  s    	 c             C   s™   t  j j d d ƒ p t  j j d d ƒ } | d k o d St |  ƒ \ } } xC | j d ƒ D]2 } | o% | j | ƒ p |  j | ƒ o d Sq_ Wd S(   uÏ   Test if proxies should not be used for a particular host.

    Checks the environment for a variable named no_proxy, which should
    be a list of DNS suffixes separated by commas, or '*' for all hosts.
    u   no_proxyu    u   NO_PROXYu   *i   u   ,i    (   u   osu   environu   getu	   splitportu   splitu   endswith(   u   hostu   no_proxyu   hostonlyu   portu   name(    (    u+   /mit/python/lib/python3.0/urllib/request.pyu   proxy_bypass_environmentA  s    + '	u   darwinc              C   sµ   y d d l  }  Wn t k
 o i  SYn Xy |  j ƒ  } Wn |  j k
 o i  SYn Xi  } d | k oE | d o: y | d } Wn |  j k
 o Yq± Xd | | d <n | S(   uÜ   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.

        i    Nu   UseHTTPProxyu   HTTPProxyHostu	   http://%su   http(   u   icu   ImportErroru   ICu   error(   u   icu   configu   proxiesu   value(    (    u+   /mit/python/lib/python3.0/urllib/request.pyu   getproxies_internetconfigV  s     

c             C   s   t  ƒ  o t |  ƒ Sd Sd  S(   Ni    (   u   getproxies_environmentu   proxy_bypass_environment(   u   host(    (    u+   /mit/python/lib/python3.0/urllib/request.pyu   proxy_bypasst  s    
c               C   s   t  ƒ  p t ƒ  S(   N(   u   getproxies_environmentu   getproxies_internetconfig(    (    (    u+   /mit/python/lib/python3.0/urllib/request.pyu
   getproxiesz  s    c        	      C   sv  i  }  y d d l  } Wn t k
 o |  SYn Xy!| j | j d ƒ } | j | d ƒ d } | oá t | j | d ƒ d ƒ } d | k os x± | j d ƒ D][ } | j d d ƒ \ } } d d l } | j d	 | ƒ p d
 | | f } n | |  | <qŸ WqG| d d … d k o | |  d <qGd | |  d <d | |  d <n | j	 ƒ  Wn t
 t t f k
 o Yn X|  S(   ux   Return a dictionary of scheme -> proxy server URL mappings.

        Win32 uses the registry to store proxies.

        i    Nu;   Software\Microsoft\Windows\CurrentVersion\Internet Settingsu   ProxyEnableu   ProxyServeru   =u   ;i   u   ^([^/:]+)://u   %s://%si   u   http:u   httpu	   http://%su   ftp://%su   ftp(   u   _winregu   ImportErroru   OpenKeyu   HKEY_CURRENT_USERu   QueryValueExu   stru   splitu   reu   matchu   Closeu   WindowsErroru
   ValueErroru	   TypeError(	   u   proxiesu   _winregu   internetSettingsu   proxyEnableu   proxyServeru   pu   protocolu   addressu   re(    (    u+   /mit/python/lib/python3.0/urllib/request.pyu   getproxies_registry~  s:    
		 c               C   s   t  ƒ  p t ƒ  S(   u¥   Return a dictionary of scheme -> proxy server URL mappings.

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

        (   u   getproxies_environmentu   getproxies_registry(    (    (    u+   /mit/python/lib/python3.0/urllib/request.pyu
   getproxies«  s    c              C   sa  y d d  l  } d d  l } Wn t k
 o d SYn XyK | j | j d ƒ } | j | d ƒ d } t | j | d ƒ d ƒ } Wn t k
 o d SYn X| p | o d St |  ƒ \ } } | g }  y1 t	 j
 | ƒ } | | k o |  j | ƒ n Wn t	 j k
 o Yn Xy1 t	 j | ƒ }	 |	 | k o |  j |	 ƒ n Wn t	 j k
 o Yn X| j d ƒ } d }
 xl |
 t | ƒ k  oX | |
 d k o9 d d t	 j ƒ  t	 j
 t	 j ƒ  ƒ g | |
 |
 d	 … <n |
 d	 7}
 q{Wxs | D]k } | j d
 d ƒ } | j d d ƒ } | j d d
 ƒ } x, |  D]$ } | j | | | j ƒ o d	 Sq1WqîWd S(   Ni    u;   Software\Microsoft\Windows\CurrentVersion\Internet Settingsu   ProxyEnableu   ProxyOverrideu   ;u   <local>u	   localhostu	   127.0.0.1i   u   .u   \.u   *u   .*u   ?(   u   _winregu   reu   ImportErroru   OpenKeyu   HKEY_CURRENT_USERu   QueryValueExu   stru   WindowsErroru	   splitportu   socketu   gethostbynameu   appendu   erroru   getfqdnu   splitu   lenu   gethostnameu   replaceu   matchu   I(   u   hostu   _winregu   reu   internetSettingsu   proxyEnableu   proxyOverrideu   rawHostu   portu   addru   fqdnu   iu   testu   val(    (    u+   /mit/python/lib/python3.0/urllib/request.pyu   proxy_bypass_registry´  sf    
		
	 	$  c             C   s#   t  ƒ  o t |  ƒ St |  ƒ Sd S(   u¥   Return a dictionary of scheme -> proxy server URL mappings.

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

        N(   u   getproxies_environmentu   proxy_bypass_environmentu   proxy_bypass_registry(   u   host(    (    u+   /mit/python/lib/python3.0/urllib/request.pyu   proxy_bypassï  s    
(r   u   __doc__u   base64u   emailu   hashlibu   http.clientu   httpu   iou   osu	   posixpathu   randomu   reu   socketu   sysu   timeu   bisectu   urllib.erroru   URLErroru	   HTTPErroru   ContentTooShortErroru   urllib.parseu   urlparseu   urlsplitu   urljoinu   unwrapu   quoteu   unquoteu	   splittypeu	   splithostu	   splitportu	   splituseru   splitpasswdu	   splitattru
   splitqueryu
   splitvalueu   to_bytesu
   urlunparseu   urllib.responseu
   addinfourlu   addclosehooku   sslu   Falseu	   _have_sslu   Trueu   versionu   __version__u   Noneu   _openeru   _GLOBAL_DEFAULT_TIMEOUTu   urlopenu   install_openeru
   _urlopeneru   urlretrieveu
   urlcleanupu   compileu   ASCIIu   _cut_port_reu   request_hostu   Requestu   OpenerDirectoru   build_openeru   BaseHandleru   HTTPErrorProcessoru   HTTPDefaultErrorHandleru   HTTPRedirectHandleru   _parse_proxyu   ProxyHandleru   HTTPPasswordMgru   HTTPPasswordMgrWithDefaultRealmu   AbstractBasicAuthHandleru   HTTPBasicAuthHandleru   ProxyBasicAuthHandleru   randombytesu   AbstractDigestAuthHandleru   HTTPDigestAuthHandleru   ProxyDigestAuthHandleru   AbstractHTTPHandleru   HTTPHandleru   hasattru   clientu   HTTPSHandleru   HTTPCookieProcessoru   UnknownHandleru   parse_keqv_listu   parse_http_listu   FileHandleru   _safe_gethostbynameu
   FTPHandleru   CacheFTPHandleru   MAXFTPCACHEu   nameu   macurl2pathu   url2pathnameu   pathname2urlu
   nturl2pathu   ftpcacheu	   URLopeneru   FancyURLopeneru
   _localhostu	   localhostu	   _thishostu   thishostu
   _ftperrorsu	   ftperrorsu
   _noheadersu	   noheadersu
   ftpwrapperu   getproxies_environmentu   proxy_bypass_environmentu   platformu   getproxies_internetconfigu   proxy_bypassu
   getproxiesu   getproxies_registryu   proxy_bypass_registry(    (    (    u+   /mit/python/lib/python3.0/urllib/request.pyu   <module>E   sº   j			h	&^	H&@
-
	…N	
	+.	:1		ÿ ¶¿				
N					-			;