/usr/lib/python2.6/site-packages/pip-7.1.2-py2.6.egg/pip/utils
Edit: /usr/lib/python2.6/site-packages/pip-7.1.2-py2.6.egg/pip/utils/ui.pyc (7521B)
Ρς
vVc @` s d d k l Z d d k l Z d d k Z d d k Z d d k l Z l Z l Z d d k l Z d d k
l Z d d k l
Z
d d k l Z d d k l Z l Z d d
k l Z d d k l Z y d d k l Z Wn e j
o
d Z n Xd
Z e e e Z d e f d YZ d e f d YZ d e f d YZ d e e e e f d YZ d e e e e e f d YZ! d S( i ( t absolute_import( t divisionN( t signalt SIGINTt default_int_handler( t WINDOWS( t format_size( t get_indentation( t six( t Bart IncrementalBar( t WritelnMixin( t Spinner( t coloramac C` s¬ t | i d d } | p | St | d t i t | d t i g } | t t | d g 7} y t i i | i | Wn t j
o | SX| Sd S( Nt encodingt
empty_fillt fillt phases( t getattrt filet NoneR t text_typet listt joint encodet UnicodeEncodeError( t preferredt fallbackR t
characters( ( sD /usr/lib/python2.6/site-packages/pip-7.1.2-py2.6.egg/pip/utils/ui.pyt _select_progress_class s t InterruptibleMixinc B` s) e Z d Z d Z d Z d Z RS( sΒ
Helper to ensure that self.finish() gets called on keyboard interrupt.
This allows downloads to be interrupted without leaving temporary state
(like hidden cursors) behind.
This class is similar to the progress library's existing SigIntMixin
helper, but as of version 1.2, that helper has the following problems:
1. It calls sys.exit().
2. It discards the existing SIGINT handler completely.
3. It leaves its own handler in place even after an uninterrupted finish,
which will have unexpected delayed effects if the user triggers an
unrelated keyboard interrupt some time after a progress-displaying
download has already completed, for example.
c O` sO t t | i | | t t | i | _ | i d j o
t | _ n d S( s=
Save the original SIGINT handler for later.
N( t superR t __init__R R t
handle_sigintt original_handlerR R ( t selft argst kwargs( ( sD /usr/lib/python2.6/site-packages/pip-7.1.2-py2.6.egg/pip/utils/ui.pyR H s c C` s' t t | i t t | i d S( s½
Restore the original SIGINT handler after finishing.
This should happen regardless of whether the progress display finishes
normally, or gets interrupted.
N( R R t finishR R R" ( R# ( ( sD /usr/lib/python2.6/site-packages/pip-7.1.2-py2.6.egg/pip/utils/ui.pyR&