
;Tc           @   s  d  Z  d d l Z e j d k Z y d d l Z Wn e k
 rP d d l Z n Xy d d l m Z Wn! e k
 r d d l	 m Z n Xy d d l
 m Z Wn? e k
 r y d d l m Z Wq e k
 r d Z q Xn Xd   Z y d d l m Z Wn; e k
 r9y d d l Z Wq:e k
 r5d Z q:Xn Xy d d	 l m Z Wn! e k
 rqd d	 l m Z n Xe re Z e Z d
   Z n e Z e Z e Z d   Z d   Z d S(   sD   Special module to handle differences between Python 2 and 3 versionsiNi   i    (   t   urlopen(   t   md5c         C   s?   t    } t r( | j |  j d   n | j |   | j   S(   Ns   UTF-8(   R   t   PY3Kt   updatet   encodet	   hexdigest(   t   fnt   h(    (    s/   /var/www/ficnx/bin/fpdf/fpdf-1.7.2/fpdf/py3k.pyt   hashpath   s
    	(   t   Image(   t
   HTMLParserc         C   s   |  S(   N(    (   t   x(    (    s/   /var/www/ficnx/bin/fpdf/fpdf-1.7.2/fpdf/py3k.pyt   <lambda>6   s    c         C   sO   t  |  t  r |  j d  St  |  t  rK t r> t |  g  St |   Sn  d  S(   Nt   latin1(   t
   isinstancet
   basestringR   t   intR   t   bytest   chr(   t   s(    (    s/   /var/www/ficnx/bin/fpdf/fpdf-1.7.2/fpdf/py3k.pyt   b=   s    c           C   s   t  j   d S(   sA   Return the current the exception instance currently being handledi   (   t   syst   exc_info(    (    (    s/   /var/www/ficnx/bin/fpdf/fpdf-1.7.2/fpdf/py3k.pyt	   exceptionF   s    (   i   i    (   t   __doc__R   t   version_infoR   t   cPicklet   picklet   ImportErrort   urllibR    t   urllib.requestt   hashlibR   t   NoneR   t   PILR	   R
   t   html.parsert   strR   t   unicodet   ordR   R   (    (    (    s/   /var/www/ficnx/bin/fpdf/fpdf-1.7.2/fpdf/py3k.pyt   <module>   sL   			