
Ebc           @   s2  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 e j d d k Z e j	 j
 d  Z e j	 j
 d  o d e j k Z d e j k o d	 e j j d
 d  k Z e j	 j
 d  o e o e Z d Z e j d  Z d   Z e e d  Z d   Z d   Z d e j f d     YZ d e f d     YZ e r[e Z e  Z  e! e f Z" e# e$ f Z% d   Z& e' Z( d   Z) e j d  Z* d   Z+ y d  d l, Z, Wn e- k
 rn
 Xd   Z+ y d  d l. Z. Wn e- k
 rn
 Xd   Z+ d   Z/ d   Z0 d   Z1 d   Z2 d d d   Z4 d d d!  Z5 d d d"  Z6 d#   Z7 nd  d l Z e! Z e8 Z  e! f Z" e# f Z% e9 Z( d$   Z/ d%   Z& d&   Z) e d'  Z: e d(  Z; d)   Z< d*   Z= d+   Z> d,   Z? d-   Z@ e e d.  ZA e d/  ZB e d0  ZC d1   Z0 d2   Z1 d3   Z2 d d d4  Z4 d d d5  Z5 d d d6  Z6 d7   Z7 d d8  ZD d9   ZE d: d d; e d<  ZF eG e d=  re jH ZI eJ ZK n e jL ZI e ZK d> e f d?     YZM d ZN d ZO d ZP d@   ZQ dA   ZR d d dB  ZS e rdC Z dD dE lT mU ZU mV ZV dF   ZW e rGd dG  Z  n  y d  d lO ZO Wn e- k
 rjqXe   ZX d dH  ZN dI   ZP n dJ   ZW dK   ZU dL   ZV dM   ZY dN   ZZ dO   Z[ e[ dP   e4  Z\ e[ dQ   e5  Z] e[ dR   e6  Z^ i e0 dS 6e1 dT 6e2 dU 6Z_ i e4 dS 6e5 dT 6e6 dU 6Z` d S(V   iN(   t   WeakKeyDictionaryi    i   t   cygwint   wint   GCCt   APPENGINE_RUNTIMEs   Development/t   SERVER_SOFTWAREt    iP   s   \033\[[;?0-9]*[a-zA-Z]c           C   s   t  j   p t  j   S(   N(   t   syst   getfilesystemencodingt   getdefaultencoding(    (    (    se   /var/www/html/facial-emotion-detection-webapp-main/flask/lib/python2.7/site-packages/click/_compat.pyt   get_filesystem_encoding   s    c      
   C   sR   | d  k r t |   } n  | d  k r0 d } n  t |  | | d t d | d | S(   Nt   replacet   line_bufferingt   force_readablet   force_writable(   t   Nonet   get_best_encodingt   _NonClosingTextIOWrappert   True(   t   streamt   encodingt   errorsR   R   (    (    se   /var/www/html/facial-emotion-detection-webapp-main/flask/lib/python2.7/site-packages/click/_compat.pyt   _make_text_stream   s    	c         C   s3   y t  j |   j d k SWn t k
 r. t SXd S(   s$   Checks if a given encoding is ascii.t   asciiN(   t   codecst   lookupt   namet   LookupErrort   False(   R   (    (    se   /var/www/html/facial-emotion-detection-webapp-main/flask/lib/python2.7/site-packages/click/_compat.pyt   is_ascii_encoding,   s    c         C   s2   t  |  d d  p t j   } t |  r. d S| S(   s1   Returns the default stream encoding if not found.R   s   utf-8N(   t   getattrR   R   R	   R   (   R   t   rv(    (    se   /var/www/html/facial-emotion-detection-webapp-main/flask/lib/python2.7/site-packages/click/_compat.pyR   4   s    R   c           B   sD   e  Z e e d   Z e r0 d   Z d   Z n  d   Z d   Z RS(   c         K   s9   t  | | |  |  _ } t j j |  | | | |  d  S(   N(   t   _FixupStreamt   _streamt   iot   TextIOWrappert   __init__(   t   selfR   R   R   R   R   t   extra(    (    se   /var/www/html/facial-emotion-detection-webapp-main/flask/lib/python2.7/site-packages/click/_compat.pyR$   =   s    	c         C   sf   t  | t  s t |  rS y |  j   Wn t k
 r< n X|  j j t |   St j j |  |  S(   N(	   t
   isinstancet   strt   is_bytest   flusht	   Exceptiont   buffert   writeR"   R#   (   R%   t   x(    (    se   /var/www/html/facial-emotion-detection-webapp-main/flask/lib/python2.7/site-packages/click/_compat.pyR-   N   s    c         C   s"   x | D] } |  j  |  q Wd  S(   N(   R-   (   R%   t   linest   line(    (    se   /var/www/html/facial-emotion-detection-webapp-main/flask/lib/python2.7/site-packages/click/_compat.pyt
   writelinesW   s    c         C   s&   y |  j    Wn t k
 r! n Xd  S(   N(   t   detachR+   (   R%   (    (    se   /var/www/html/facial-emotion-detection-webapp-main/flask/lib/python2.7/site-packages/click/_compat.pyt   __del__[   s    c         C   s   |  j  j   S(   N(   R!   t   isatty(   R%   (    (    se   /var/www/html/facial-emotion-detection-webapp-main/flask/lib/python2.7/site-packages/click/_compat.pyR4   a   s    (	   t   __name__t
   __module__R   R$   t   PY2R-   R1   R3   R4   (    (    (    se   /var/www/html/facial-emotion-detection-webapp-main/flask/lib/python2.7/site-packages/click/_compat.pyR   <   s   				R    c           B   sJ   e  Z d  Z e e d  Z d   Z d   Z d   Z d   Z d   Z	 RS(   sQ  The new io interface needs more from streams than streams
    traditionally implement.  As such, this fix-up code is necessary in
    some circumstances.

    The forcing of readable and writable flags are there because some tools
    put badly patched objects on sys (one such offender are certain version
    of jupyter notebook).
    c         C   s   | |  _  | |  _ | |  _ d  S(   N(   R!   t   _force_readablet   _force_writable(   R%   R   R   R   (    (    se   /var/www/html/facial-emotion-detection-webapp-main/flask/lib/python2.7/site-packages/click/_compat.pyR$   p   s    		c         C   s   t  |  j |  S(   N(   R   R!   (   R%   R   (    (    se   /var/www/html/facial-emotion-detection-webapp-main/flask/lib/python2.7/site-packages/click/_compat.pyt   __getattr__u   s    c         C   sQ   t  |  j d d   } | d  k	 r+ | |  St rA |  j j |  S|  j j |  S(   Nt   read1(   R   R!   R   R7   t   readlinet   read(   R%   t   sizet   f(    (    se   /var/www/html/facial-emotion-detection-webapp-main/flask/lib/python2.7/site-packages/click/_compat.pyR;   x   s    
c         C   sb   |  j  r t St |  j d d   } | d  k	 r5 |   Sy |  j j d  Wn t k
 r] t SXt S(   Nt   readablei    (   R8   R   R   R!   R   R=   R+   R   (   R%   R.   (    (    se   /var/www/html/facial-emotion-detection-webapp-main/flask/lib/python2.7/site-packages/click/_compat.pyR@      s    	c         C   s   |  j  r t St |  j d d   } | d  k	 r5 |   Sy |  j j d  Wn: t k
 r y |  j j d  Wq t k
 r t SXn Xt S(   Nt   writableR   (   R9   R   R   R!   R   R-   R+   R   (   R%   R.   (    (    se   /var/www/html/facial-emotion-detection-webapp-main/flask/lib/python2.7/site-packages/click/_compat.pyRA      s    		c         C   s^   t  |  j d d   } | d  k	 r( |   Sy |  j j |  j j    Wn t k
 rY t SXt S(   Nt   seekable(   R   R!   R   t   seekt   tellR+   R   R   (   R%   R.   (    (    se   /var/www/html/facial-emotion-detection-webapp-main/flask/lib/python2.7/site-packages/click/_compat.pyRB      s    (
   R5   R6   t   __doc__R   R$   R:   R;   R@   RA   RB   (    (    (    se   /var/www/html/facial-emotion-detection-webapp-main/flask/lib/python2.7/site-packages/click/_compat.pyR    f   s   				c         C   s
   |  j    S(   N(   t	   iteritems(   R.   (    (    se   /var/www/html/facial-emotion-detection-webapp-main/flask/lib/python2.7/site-packages/click/_compat.pyt   <lambda>   R   c         C   s   t  |  t t f  S(   N(   R'   R,   t	   bytearray(   R.   (    (    se   /var/www/html/facial-emotion-detection-webapp-main/flask/lib/python2.7/site-packages/click/_compat.pyR)      s    s   ^[a-zA-Z_][a-zA-Z0-9_]*$c         C   s   |  S(   N(    (   R?   (    (    se   /var/www/html/facial-emotion-detection-webapp-main/flask/lib/python2.7/site-packages/click/_compat.pyt   set_binary_mode   s    c         C   s;   y |  j    } Wn t k
 r# n Xt j | t j  |  S(   N(   t   filenoR+   t   msvcrtt   setmodet   ost   O_BINARY(   R?   RJ   (    (    se   /var/www/html/facial-emotion-detection-webapp-main/flask/lib/python2.7/site-packages/click/_compat.pyRI      s    c         C   s[   y |  j    } Wn t k
 r# n4 Xt j | t j  } t j | t j | t j @ |  S(   N(   RJ   R+   t   fcntlt   F_GETFLt   F_SETFLRM   t
   O_NONBLOCK(   R?   RJ   t   flags(    (    se   /var/www/html/facial-emotion-detection-webapp-main/flask/lib/python2.7/site-packages/click/_compat.pyRI      s    c         C   s   t  j |   d  k	 S(   N(   t   _identifier_ret   searchR   (   R.   (    (    se   /var/www/html/facial-emotion-detection-webapp-main/flask/lib/python2.7/site-packages/click/_compat.pyt   isidentifier   s    c           C   s   t  t j  S(   N(   RI   R   t   stdin(    (    (    se   /var/www/html/facial-emotion-detection-webapp-main/flask/lib/python2.7/site-packages/click/_compat.pyt   get_binary_stdin   s    c           C   s   t  d  t t j  S(   Nt   stdout(   t   _wrap_std_streamRI   R   RY   (    (    (    se   /var/www/html/facial-emotion-detection-webapp-main/flask/lib/python2.7/site-packages/click/_compat.pyt   get_binary_stdout   s    
c           C   s   t  d  t t j  S(   Nt   stderr(   RZ   RI   R   R\   (    (    (    se   /var/www/html/facial-emotion-detection-webapp-main/flask/lib/python2.7/site-packages/click/_compat.pyt   get_binary_stderr   s    
c         C   s>   t  t j |  |  } | d  k	 r% | St t j |  | d t S(   NR   (   t   _get_windows_console_streamR   RW   R   R   R   (   R   R   R   (    (    se   /var/www/html/facial-emotion-detection-webapp-main/flask/lib/python2.7/site-packages/click/_compat.pyt   get_text_stdin   s    c         C   sH   t  d  t t j |  |  } | d  k	 r/ | St t j |  | d t S(   NRY   R   (   RZ   R^   R   RY   R   R   R   (   R   R   R   (    (    se   /var/www/html/facial-emotion-detection-webapp-main/flask/lib/python2.7/site-packages/click/_compat.pyt   get_text_stdout   s
    
c         C   sH   t  d  t t j |  |  } | d  k	 r/ | St t j |  | d t S(   NR\   R   (   RZ   R^   R   R\   R   R   R   (   R   R   R   (    (    se   /var/www/html/facial-emotion-detection-webapp-main/flask/lib/python2.7/site-packages/click/_compat.pyt   get_text_stderr  s
    
c         C   s+   t  |  t  r' |  j t   d  }  n  |  S(   NR   (   R'   t   bytest   decodeR
   (   t   value(    (    se   /var/www/html/facial-emotion-detection-webapp-main/flask/lib/python2.7/site-packages/click/_compat.pyt   filename_to_ui  s    c         C   s
   |  j    S(   N(   RV   (   R.   (    (    se   /var/www/html/facial-emotion-detection-webapp-main/flask/lib/python2.7/site-packages/click/_compat.pyRG     R   c         C   s   t  |  j    S(   N(   t   itert   items(   R.   (    (    se   /var/www/html/facial-emotion-detection-webapp-main/flask/lib/python2.7/site-packages/click/_compat.pyRG     R   c         C   s   t  |  t t t f  S(   N(   R'   Rb   t
   memoryviewRH   (   R.   (    (    se   /var/www/html/facial-emotion-detection-webapp-main/flask/lib/python2.7/site-packages/click/_compat.pyR)     s    c         C   s3   y t  |  j d  t  SWn t k
 r. | SXd  S(   Ni    (   R'   R=   Rb   R+   (   R   t   default(    (    se   /var/www/html/facial-emotion-detection-webapp-main/flask/lib/python2.7/site-packages/click/_compat.pyt   _is_binary_reader   s    c         C   sS   y |  j  d  Wn; t k
 rN y |  j  d  t SWn t k
 rI n X| SXt S(   NR   (   R-   R+   R   R   (   R   Ri   (    (    se   /var/www/html/facial-emotion-detection-webapp-main/flask/lib/python2.7/site-packages/click/_compat.pyt   _is_binary_writer(  s    c         C   sH   t  |  t  r |  St |  d d   } | d  k	 rD t  | t  rD | Sd  S(   NR,   (   Rj   R   R   R   R   (   R   t   buf(    (    se   /var/www/html/facial-emotion-detection-webapp-main/flask/lib/python2.7/site-packages/click/_compat.pyt   _find_binary_reader4  s
    c         C   sH   t  |  t  r |  St |  d d   } | d  k	 rD t  | t  rD | Sd  S(   NR,   (   Rk   R   R   R   R   (   R   Rl   (    (    se   /var/www/html/facial-emotion-detection-webapp-main/flask/lib/python2.7/site-packages/click/_compat.pyt   _find_binary_writerC  s
    c         C   s   t  t |  d d  p d  S(   s3   A stream is misconfigured if its encoding is ASCII.R   R   N(   R   R   R   (   R   (    (    se   /var/www/html/facial-emotion-detection-webapp-main/flask/lib/python2.7/site-packages/click/_compat.pyt   _stream_is_misconfiguredR  s    c         C   s4   t  |  | d  } | | k p3 | d k o3 | d k	 S(   s   A stream attribute is compatible if it is equal to the
        desired value or the desired value is unset and the attribute
        has a value.
        N(   R   R   (   R   t   attrRd   t   stream_value(    (    se   /var/www/html/facial-emotion-detection-webapp-main/flask/lib/python2.7/site-packages/click/_compat.pyt   _is_compat_stream_attrZ  s    c         C   s"   t  |  d |  o! t  |  d |  S(   sk   Check if a stream's encoding and errors attributes are
        compatible with the desired values.
        R   R   (   Rr   (   R   R   R   (    (    se   /var/www/html/facial-emotion-detection-webapp-main/flask/lib/python2.7/site-packages/click/_compat.pyt   _is_compatible_text_streamb  s    c         C   s   | |  t   r |  } nK t |  | |  rG | d  k o? t |   rG |  S| |   } | d  k rc |  S| d  k rx d } n  t | | | d | d | S(   NR   R   R   (   R   Rs   R   Ro   R   (   t   text_streamR   R   t	   is_binaryt   find_binaryR   R   t   binary_reader(    (    se   /var/www/html/facial-emotion-detection-webapp-main/flask/lib/python2.7/site-packages/click/_compat.pyt   _force_correct_text_streamj  s     			c         C   s   t  |  | | t t d | S(   NR   (   Rx   Rj   Rm   (   t   text_readerR   R   R   (    (    se   /var/www/html/facial-emotion-detection-webapp-main/flask/lib/python2.7/site-packages/click/_compat.pyt   _force_correct_text_reader  s    c         C   s   t  |  | | t t d | S(   NR   (   Rx   Rk   Rn   (   t   text_writerR   R   R   (    (    se   /var/www/html/facial-emotion-detection-webapp-main/flask/lib/python2.7/site-packages/click/_compat.pyt   _force_correct_text_writer  s    c          C   s.   t  t j  }  |  d  k r* t d   n  |  S(   Ns6   Was not able to determine binary stream for sys.stdin.(   Rm   R   RW   R   t   RuntimeError(   t   reader(    (    se   /var/www/html/facial-emotion-detection-webapp-main/flask/lib/python2.7/site-packages/click/_compat.pyRX     s    c          C   s.   t  t j  }  |  d  k r* t d   n  |  S(   Ns7   Was not able to determine binary stream for sys.stdout.(   Rn   R   RY   R   R}   (   t   writer(    (    se   /var/www/html/facial-emotion-detection-webapp-main/flask/lib/python2.7/site-packages/click/_compat.pyR[     s
    c          C   s.   t  t j  }  |  d  k r* t d   n  |  S(   Ns7   Was not able to determine binary stream for sys.stderr.(   Rn   R   R\   R   R}   (   R   (    (    se   /var/www/html/facial-emotion-detection-webapp-main/flask/lib/python2.7/site-packages/click/_compat.pyR]     s
    c         C   s>   t  t j |  |  } | d  k	 r% | St t j |  | d t S(   NR   (   R^   R   RW   R   Rz   R   (   R   R   R   (    (    se   /var/www/html/facial-emotion-detection-webapp-main/flask/lib/python2.7/site-packages/click/_compat.pyR_     s
    c         C   s>   t  t j |  |  } | d  k	 r% | St t j |  | d t S(   NR   (   R^   R   RY   R   R|   R   (   R   R   R   (    (    se   /var/www/html/facial-emotion-detection-webapp-main/flask/lib/python2.7/site-packages/click/_compat.pyR`     s
    c         C   s>   t  t j |  |  } | d  k	 r% | St t j |  | d t S(   NR   (   R^   R   R\   R   R|   R   (   R   R   R   (    (    se   /var/www/html/facial-emotion-detection-webapp-main/flask/lib/python2.7/site-packages/click/_compat.pyRa     s
    c         C   sI   t  |  t  r' |  j t   d  }  n |  j d d  j d d  }  |  S(   NR   s   utf-8t   surrogateescape(   R'   Rb   Rc   R
   t   encode(   Rd   (    (    se   /var/www/html/facial-emotion-detection-webapp-main/flask/lib/python2.7/site-packages/click/_compat.pyRe     s    c         C   sd   t  |  d  r |  j } n! | d  k	 r0 | } n t |   } t | t  r` | j d d  } n  | S(   Nt   strerrors   utf-8R   (   t   hasattrR   R   R(   R'   Rb   Rc   (   t   eRi   t   msg(    (    se   /var/www/html/facial-emotion-detection-webapp-main/flask/lib/python2.7/site-packages/click/_compat.pyt   get_streerror  s    	c         C   s   d | k } | r i  } n i | d 6| d 6} t  s< | rO t j |  | |  St j |  d j | j d d    } t | |  S(   s+  On Python 2, :func:`io.open` returns a text file wrapper that
    requires passing ``unicode`` to ``write``. Need to open the file in
    binary mode then wrap it in a subclass that can write ``str`` and
    ``unicode``.

    Also handles not passing ``encoding`` and ``errors`` in binary mode.
    t   bR   R   s   {}bt   tR   (   R7   R"   t   opent   formatR   R   (   t   filet   modeR   R   t   binaryt   kwargsR?   (    (    se   /var/www/html/facial-emotion-detection-webapp-main/flask/lib/python2.7/site-packages/click/_compat.pyt   _wrap_io_open  s    	't   rt   strictc            s  d   k } |  d k r t    f d   d d d g D  ri | rP t   t f St d | d |  t f S| r| t   t f St d | d |  t f S| s t |    | |  t f Sd   k r t d	   n  d   k r t d
   n  d   k rt d   n  d d  l	 } d d  l
 } y t j |   j } Wn t k
 rLd  } n Xt j t j Bt j B}	 | r|	 t t d d  O}	 n  x t rmt j j t j j |   d j | j d    }
 y, t j |
 |	 | d  k rd n |  } PWqt k
 ri} | j	 | j k st j d k rc| j	 | j k rct j j | j  rct j | j t j   rcqn    qXqW| d  k	 rt j! |
 |  n  t |   | |  } t" | |
 t j j# |    t f S(   NR   t   -c         3   s   |  ] } |   k Vq d  S(   N(    (   t   .0t   m(   R   (    se   /var/www/html/facial-emotion-detection-webapp-main/flask/lib/python2.7/site-packages/click/_compat.pys	   <genexpr>  s    t   wt   aR.   R   R   s   Appending to an existing file is not supported, because that would involve an expensive `copy`-operation to a temporary file. Open the file in normal `w`-mode and copy explicitly if that's what you're after.s&   Use the `overwrite`-parameter instead.s,   Atomic writes only make sense with `w`-mode.iRN   i    s   .__atomic-write{:08x}i   i    i  t   ntI       ($   t   anyR[   R   R`   RX   R_   R   R   t
   ValueErrort   errnot   randomRM   t   statt   st_modet   OSErrorR   t   O_RDWRt   O_CREATt   O_EXCLR   t   patht   joint   dirnameR   t	   randrangeR   t   EEXISTR   t   EACCESt   isdirt   filenamet   accesst   W_OKt   chmodt   _AtomicFilet   realpath(   R   R   R   R   t   atomicR   R   R   t   permRS   t   tmp_filenamet   fdR   R?   (    (   R   se   /var/www/html/facial-emotion-detection-webapp-main/flask/lib/python2.7/site-packages/click/_compat.pyt   open_stream  s\    %
		'R   R   c           B   sP   e  Z d    Z e d    Z e d  Z d   Z d   Z d   Z	 d   Z
 RS(   c         C   s(   | |  _  | |  _ | |  _ t |  _ d  S(   N(   t   _ft   _tmp_filenamet   _real_filenameR   t   closed(   R%   R?   R   t   real_filename(    (    se   /var/www/html/facial-emotion-detection-webapp-main/flask/lib/python2.7/site-packages/click/_compat.pyR$   T  s    			c         C   s   |  j  S(   N(   R   (   R%   (    (    se   /var/www/html/facial-emotion-detection-webapp-main/flask/lib/python2.7/site-packages/click/_compat.pyR   Z  s    c         C   sk   |  j  r d  S|  j j   t sK y t j |  j  WqK t k
 rG qK Xn  t |  j	 |  j  t
 |  _  d  S(   N(   R   R   t   closet   _can_replaceRM   t   removeR   R   t   _replaceR   R   (   R%   t   delete(    (    se   /var/www/html/facial-emotion-detection-webapp-main/flask/lib/python2.7/site-packages/click/_compat.pyR   ^  s    	c         C   s   t  |  j |  S(   N(   R   R   (   R%   R   (    (    se   /var/www/html/facial-emotion-detection-webapp-main/flask/lib/python2.7/site-packages/click/_compat.pyR:   j  s    c         C   s   |  S(   N(    (   R%   (    (    se   /var/www/html/facial-emotion-detection-webapp-main/flask/lib/python2.7/site-packages/click/_compat.pyt	   __enter__m  s    c         C   s   |  j  d | d  k	  d  S(   NR   (   R   R   (   R%   t   exc_typet	   exc_valuet   tb(    (    se   /var/www/html/facial-emotion-detection-webapp-main/flask/lib/python2.7/site-packages/click/_compat.pyt   __exit__p  s    c         C   s   t  |  j  S(   N(   t   reprR   (   R%   (    (    se   /var/www/html/facial-emotion-detection-webapp-main/flask/lib/python2.7/site-packages/click/_compat.pyt   __repr__s  s    (   R5   R6   R$   t   propertyR   R   R   R:   R   R   R   (    (    (    se   /var/www/html/facial-emotion-detection-webapp-main/flask/lib/python2.7/site-packages/click/_compat.pyR   S  s   				c         C   s   t  j d |   S(   NR   (   t   _ansi_ret   sub(   Rd   (    (    se   /var/www/html/facial-emotion-detection-webapp-main/flask/lib/python2.7/site-packages/click/_compat.pyt
   strip_ansi|  s    c         C   sB   t  r
 d  Sx" t |  t t f  r. |  j }  q W|  j j j d  S(   Ns
   ipykernel.(   t   WINR'   R    R   R!   t	   __class__R6   t
   startswith(   R   (    (    se   /var/www/html/facial-emotion-detection-webapp-main/flask/lib/python2.7/site-packages/click/_compat.pyt   _is_jupyter_kernel_output  s
    c         C   sA   | d  k r< |  d  k r$ t j }  n  t |   o; t |   S| S(   N(   R   R   RW   R4   R   (   R   t   color(    (    se   /var/www/html/facial-emotion-detection-webapp-main/flask/lib/python2.7/site-packages/click/_compat.pyt   should_strip_ansi  s
    iO   i   (   R^   RZ   c          C   s   d d  l  }  |  j   S(   Ni(   t   localet   getpreferredencoding(   R   (    (    se   /var/www/html/facial-emotion-detection-webapp-main/flask/lib/python2.7/site-packages/click/_compat.pyt   _get_argv_encoding  s    c         C   sH   t  j j   |  r, t   } | j |   n  t   } | j   j d  S(   Ns   
(   R   R\   R*   t   _default_text_stdoutR-   t   _default_text_stdinR<   t   rstrip(   t   promptRY   RW   (    (    se   /var/www/html/facial-emotion-detection-webapp-main/flask/lib/python2.7/site-packages/click/_compat.pyt	   raw_input  s    		c            s   y t  j |   } Wn t k
 r, d } n X| d k	 r= | St |  |  } t j |  d |   j } | j      f d   } | | _ y | t  |  <Wn t k
 r n X| S(   s  This function wraps a stream so that calls through colorama
            are issued to the win32 console API to recolor on demand.  It
            also ensures to reset the colors if a write call is interrupted
            to not destroy the console afterwards.
            t   stripc            s)   y   |   SWn  j      n Xd  S(   N(   t	   reset_all(   t   s(   t   _writet   ansi_wrapper(    se   /var/www/html/facial-emotion-detection-webapp-main/flask/lib/python2.7/site-packages/click/_compat.pyt   _safe_write  s
    
N(	   t   _ansi_stream_wrapperst   getR+   R   R   t   coloramat   AnsiToWin32R   R-   (   R   R   t   cachedR   R   R   (    (   R   R   se   /var/www/html/facial-emotion-detection-webapp-main/flask/lib/python2.7/site-packages/click/_compat.pyt   auto_wrap_for_ansi  s"    
			c          C   s9   t  j j t  j j  j }  |  j |  j |  j |  j f S(   N(	   R   t   win32t   GetConsoleScreenBufferInfot   STDOUTt   srWindowt   Rightt   Leftt   Bottomt   Top(   R   (    (    se   /var/www/html/facial-emotion-detection-webapp-main/flask/lib/python2.7/site-packages/click/_compat.pyt   get_winterm_size  s    	c           C   s   t  t j d d   p t   S(   NR   (   R   R   RW   R   R
   (    (    (    se   /var/www/html/facial-emotion-detection-webapp-main/flask/lib/python2.7/site-packages/click/_compat.pyR     s    c          G   s   d  S(   N(   R   (   R.   (    (    se   /var/www/html/facial-emotion-detection-webapp-main/flask/lib/python2.7/site-packages/click/_compat.pyRG     R   c          G   s   d  S(   N(   R   (   R.   (    (    se   /var/www/html/facial-emotion-detection-webapp-main/flask/lib/python2.7/site-packages/click/_compat.pyRG     R   c         C   s   t  t |    S(   N(   t   lenR   (   R.   (    (    se   /var/www/html/facial-emotion-detection-webapp-main/flask/lib/python2.7/site-packages/click/_compat.pyt   term_len  s    c         C   s'   y |  j    SWn t k
 r" t SXd  S(   N(   R4   R+   R   (   R   (    (    se   /var/www/html/facial-emotion-detection-webapp-main/flask/lib/python2.7/site-packages/click/_compat.pyR4     s    c            s"   t          f d   } | S(   Nc             s~      }  y   j  |   } Wn t k
 r5 d  } n X| d  k	 rF | S   } y    }  |   |  <Wn t k
 ry n X| S(   N(   R   R+   R   (   R   R   (   t   cachet   src_funct   wrapper_func(    se   /var/www/html/facial-emotion-detection-webapp-main/flask/lib/python2.7/site-packages/click/_compat.pyt   func  s    	
		(   R    (   R   R   R   (    (   R   R   R   se   /var/www/html/facial-emotion-detection-webapp-main/flask/lib/python2.7/site-packages/click/_compat.pyt   _make_cached_stream_func  s    	c           C   s   t  j S(   N(   R   RW   (    (    (    se   /var/www/html/facial-emotion-detection-webapp-main/flask/lib/python2.7/site-packages/click/_compat.pyRG     R   c           C   s   t  j S(   N(   R   RY   (    (    (    se   /var/www/html/facial-emotion-detection-webapp-main/flask/lib/python2.7/site-packages/click/_compat.pyRG     R   c           C   s   t  j S(   N(   R   R\   (    (    (    se   /var/www/html/facial-emotion-detection-webapp-main/flask/lib/python2.7/site-packages/click/_compat.pyRG     R   RW   RY   R\   (a   R   R"   RM   t   reR   t   weakrefR    t   version_infoR7   t   platformR   t   CYGWINt   versiont   MSYS2t   environR   t
   APP_ENGINER   t   DEFAULT_COLUMNSt   compileR   R
   R   R   R   R   R#   R   t   objectR    t   unicodet	   text_typeR   R(   t   string_typest   intt   longt	   int_typesRF   t   xranget
   range_typeR)   RT   RI   RK   t   ImportErrorRO   RV   RX   R[   R]   R   R_   R`   Ra   Re   t   inputt   rangeRj   Rk   Rm   Rn   Ro   Rr   Rs   Rx   Rz   R|   R   R   R   R   R   R   R   R   t   renameR   R   R   R   R   R   R   t   _winconsoleR^   RZ   R   R   R   R4   R   R   R   t   _default_text_stderrt   binary_streamst   text_streams(    (    (    se   /var/www/html/facial-emotion-detection-webapp-main/flask/lib/python2.7/site-packages/click/_compat.pyt   <module>   s   ! 			*C						
														#

					J			$											
