ok

Mini Shell

Direktori : /opt/alt/python33/lib/python3.3/site-packages/pip/
Upload File :
Current File : //opt/alt/python33/lib/python3.3/site-packages/pip/log.pyo

�
�2{Yc@s�dZddlZddlZddlZddlmZddlmZmZd�Z	ej
ejfd�Zd�Z
defd	��YZe�ZdS(
sLogging
i����N(tbackwardcompat(tcoloramat
pkg_resourcescs�fd�}|S(Ncs#djt��|tjjg�S(Nt(tjointlistRtStylet	RESET_ALL(tinp(tcolors(s8/opt/alt/python33/lib/python3.3/site-packages/pip/log.pytwrapped
s((R	R
((R	s8/opt/alt/python33/lib/python3.3/site-packages/pip/log.pyt_color_wrapscCsmt|tj�s|n|j}||kr1tSt|d�rP|j�rPtS|jd�dkritStS(NtisattytTERMtANSI(	t
isinstanceRtAnsiToWin32R
tFalsethasattrRtTruetget(tconsumertenvirontstdt
real_consumer((s8/opt/alt/python33/lib/python3.3/site-packages/pip/log.pytshould_colors	cCs�dj|jd�d �}dj|jd�d �}|jd�\}}tt|�d�}dj||g�}tj|�tj|�kS(Nt.ii(RtsplittstrtintRt
parse_version(tcurrent_versiontremoval_versiontmajortminortwarn_version((s8/opt/alt/python33/lib/python3.3/site-packages/pip/log.pytshould_warn&stLoggercBsqeZdZejdZejZejZejejdZejZZ	ej
Z
ejZeeeeee
egZie
ejj�e6e
ejj�e
6e
ejj�e6Zd�Zd�Zd�Zd�Zd�Zd�Zd	�Zd
�Zd�Zd�Zd
�Zd�Zdd�Zdd�Z!d�Z"d�Z#d�Z$e%d��Z&d�Z'RS(s�
    Logging object for use in command-line script.  Allows ranges of
    levels, to avoid some redundancy of displayed information.
    iicCs1g|_d|_t|_d|_t|_dS(Ni(t	consumerstindentRtexplicit_levelstNonetin_progresstin_progress_hanging(tself((s8/opt/alt/python33/lib/python3.3/site-packages/pip/log.pyt__init__Ls
				cGs�tjjd�rsxn|D]S\}}t|d�rV|jj|tj|�f�q|jj||f�qWn|jj|�dS(Ntwintwrite(	tsystplatformt
startswithRR&tappendRRtextend(R,R&tlevelR((s8/opt/alt/python33/lib/python3.3/site-packages/pip/log.pyt
add_consumersSs	cOs|j|j|||�dS(N(tlogtDEBUG(R,tmsgtargstkw((s8/opt/alt/python33/lib/python3.3/site-packages/pip/log.pytdebug_scOs|j|j|||�dS(N(R7tINFO(R,R9R:R;((s8/opt/alt/python33/lib/python3.3/site-packages/pip/log.pytinfobscOs|j|j|||�dS(N(R7tNOTIFY(R,R9R:R;((s8/opt/alt/python33/lib/python3.3/site-packages/pip/log.pytnotifyescOs|j|j|||�dS(N(R7tWARN(R,R9R:R;((s8/opt/alt/python33/lib/python3.3/site-packages/pip/log.pytwarnhscOs|j|j|||�dS(N(R7tERROR(R,R9R:R;((s8/opt/alt/python33/lib/python3.3/site-packages/pip/log.pyterrorkscOs|j|j|||�dS(N(R7tFATAL(R,R9R:R;((s8/opt/alt/python33/lib/python3.3/site-packages/pip/log.pytfatalnscOsLddlm}t||�r5|j|||�n|j|||�dS(s�
        Logs deprecation message which is log level WARN if the
        ``removal_version`` is > 1 minor release away and log level ERROR
        otherwise.

        removal_version should be the version that the deprecated feature is
        expected to be removed in, so something that will not exist in
        version 1.7, but will in 1.6 would have a removal_version of 1.7.
        i����(t__version__N(tpipRGR$RBRD(R,R R9R:tkwargsRG((s8/opt/alt/python33/lib/python3.3/site-packages/pip/log.pyt
deprecatedqs
c
Osu|r|rtd��qn|p'|}|r=||}n|}d|j|}|jrpd||f}nx�|jD]�\}}|j||�rz|jr�|tjtjfkr�t	|_tjj
d�tjj�nt|d�r`|d}t
|tj�r4|jj|d��}	|	|�}n|j
|�t|d�rj|j�qjqm||�qzqzWdS(Ns6You may give positional or keyword arguments, not botht s%02i %ss
R/cSs|S(N((tx((s8/opt/alt/python33/lib/python3.3/site-packages/pip/log.pyt<lambda>�stflush(t	TypeErrorR'R(R&t
level_matchesR+R0tstdouttstderrRR/RNRRtosRtCOLORSR(
R,R5R9R:R;trenderedtconsumer_levelRt
write_contentt	colorizer((s8/opt/alt/python33/lib/python3.3/site-packages/pip/log.pyR7�s6
			

cCs|j|j�otjj�S(s$Should we display download progress?(tstdout_level_matchesR?R0RQR(R,((s8/opt/alt/python33/lib/python3.3/site-packages/pip/log.pyt_show_progress�scCs_|j�r@tjjd|j|�tjj�t|_n	t|_||_	d|_dS(NRK(RZR0RQR/R'RNRR+RR*R)tlast_message(R,R9((s8/opt/alt/python33/lib/python3.3/site-packages/pip/log.pytstart_progress�s
		sdone.cCs�|j�r�|jsDtjjd|j|d�tjj�q�tjd�tjd�tjj|d�tjj�nd|_t
|_dS(Ns...s
R(RZR+R0RQR/R*RNtloggert
show_progressR)R(R,R9((s8/opt/alt/python33/lib/python3.3/site-packages/pip/log.pytend_progress�s	

	cCs�|jr�|dkr5tjjd�tjj�q�|jrgdtdt|j�t|��}nd}tjjdd|j	|j
||f�tjj�||_ndS(saIf we are in a progress scope, and no log messages have been
        shown, write out another '.'RRKiRs	
%s%s%s%sN(R+R)R0RQR/RNR[tmaxtlenR'R*(R,tmessagetpadding((s8/opt/alt/python33/lib/python3.3/site-packages/pip/log.pyR^�s		)
cCs|j||j��S(s9Returns true if a message at this level will go to stdout(RPt
_stdout_level(R,R5((s8/opt/alt/python33/lib/python3.3/site-packages/pip/log.pyRY�scCs4x*|jD]\}}|tjkr
|Sq
W|jS(s%Returns the level that stdout runs at(R&R0RQRE(R,R5R((s8/opt/alt/python33/lib/python3.3/site-packages/pip/log.pyRd�scCslt|t�r^|j|j}}|dk	r>||kr>tS|dk	sV||krZtStS||kSdS(sm
        >>> l = Logger()
        >>> l.level_matches(3, 4)
        False
        >>> l.level_matches(3, 2)
        True
        >>> l.level_matches(slice(None, 3), 3)
        False
        >>> l.level_matches(slice(None, 3), 2)
        True
        >>> l.level_matches(slice(1, 3), 1)
        True
        >>> l.level_matches(slice(2, 3), 1)
        False
        N(RtslicetstarttstopR)RR(R,R5RVRfRg((s8/opt/alt/python33/lib/python3.3/site-packages/pip/log.pyRP�scCs?|j}|dkr|dS|t|�kr7|dS||S(Nii����(tLEVELSRa(tclsR5tlevels((s8/opt/alt/python33/lib/python3.3/site-packages/pip/log.pytlevel_for_integers	cCs�g}g}xR|jD]G\}}|tjkr|j||f�|j|tjf�qqWx|D]}|jj|�qhW|jj|�dS(N(R&R0RQR3RRtremoveR4(R,t	to_removetto_addRVRtitem((s8/opt/alt/python33/lib/python3.3/site-packages/pip/log.pytmove_stdout_to_stderr	s
N((t__name__t
__module__t__doc__tloggingR8t
VERBOSE_DEBUGR=RAR?tWARNINGRCRERhRRtForetYELLOWtREDRTR-R6R<R>R@RBRDRFRJR7RZR\R_R)R^RYRdRPtclassmethodRkRp(((s8/opt/alt/python33/lib/python3.3/site-packages/pip/log.pyR%7s@
		
												&		
				(RsR0RSRtRHRtpip._vendorRRRRQRRRR$tobjectR%R](((s8/opt/alt/python33/lib/python3.3/site-packages/pip/log.pyt<module>s		�

Zerion Mini Shell 1.0