ó
�Í¾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 versionsiÿÿÿÿNi   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   			