name : _compat.pyc
�
Ҿ�\c
@sdZddlZddlZddlZddlZddddddd	d
ddg
Zejd
dkZer�eZ	e
ZeZ
eZd�Zd�Zn*e	Z	eZe
Z
eZd�Zd�ZyddlmZWn�ek
r�yddlmZWn!ek
r%ddlmZnXejdddddg�Zdefd��YZe�feeeeed�f�ee ee!d�Z"de#d�ZnXyddl$m%Z%Wn*ek
r�ej&ej'Bdd �Z%nXydd!l$m(Z(Wnek
rd%d$�Z(nXdS(&s?Module which provides compatibility with older Python versions.i����NtPY3tlongtxrangetunicodet
basestringtutbt	lru_cachetwhichtget_terminal_sizeiicCs|S(N((ts((sOC:/Program Files (x86)/Alibaba/Aegis/PythonLoader/third_party\psutil\_compat.pyRscCs
|jd�S(Nslatin-1(tencode(R
((sOC:/Program Files (x86)/Alibaba/Aegis/PythonLoader/third_party\psutil\_compat.pyRscCs
t|d�S(Ntunicode_escape(R(R
((sOC:/Program Files (x86)/Alibaba/Aegis/PythonLoader/third_party\psutil\_compat.pyR"scCs|S(N((R
((sOC:/Program Files (x86)/Alibaba/Aegis/PythonLoader/third_party\psutil\_compat.pyR%s(R(tRLockt	CacheInfothitstmissestmaxsizetcurrsizet
_HashedSeqcBs#eZdZed�Zd�ZRS(t	hashvaluecCs||(||�|_dS(N(R(tselfttupthash((sOC:/Program Files (x86)/Alibaba/Aegis/PythonLoader/third_party\psutil\_compat.pyt__init__=scCs|jS(N(R(R((sOC:/Program Files (x86)/Alibaba/Aegis/PythonLoader/third_party\psutil\_compat.pyt__hash__As(t__name__t
__module__t	__slots__RRR(((sOC:/Program Files (x86)/Alibaba/Aegis/PythonLoader/third_party\psutil\_compat.pyR:sc	s�|}	|rF||j��}
|	|7}	x|
D]}|	|7}	q/Wn|r�|	|�fd�|D��7}	|r�|	|�fd�|
D��7}	q�n0||	�dkr��|	d�|kr�|	dSt|	�S(Nc3s|]}�|�VqdS(N((t.0tv(ttype(sOC:/Program Files (x86)/Alibaba/Aegis/PythonLoader/third_party\psutil\_compat.pys	<genexpr>Osc3s!|]\}}�|�VqdS(N((RtkR(R(sOC:/Program Files (x86)/Alibaba/Aegis/PythonLoader/third_party\psutil\_compat.pys	<genexpr>Qsii(titemsR(targstkwdsttypedtkwd_markt	fasttypestsortedttupleRtlentkeytsorted_itemstitem((RsOC:/Program Files (x86)/Alibaba/Aegis/PythonLoader/third_party\psutil\_compat.pyt	_make_keyDs

 &(idcs��fd�}|S(s~Least-recently-used cache decorator, see:
        http://docs.python.org/3/library/functools.html#functools.lru_cache
        csjt��ddg�
d
\��t�
�j�t�t��	g���ddg�(�g�d\�����dkr���
�fd�}nr�dkr������
��
��f	d�}n<����������	�
���
��fd�}����	��
fd�}��	��
fd	�}�|_||_||_t	j
|��S(Niiiics#�||�}��cd7<|S(Ni((R"R#tresult(tMISSEStstatst
user_function(sOC:/Program Files (x86)/Alibaba/Aegis/PythonLoader/third_party\psutil\_compat.pytwrappergscsn�||��}�|��}|�k	rA��cd7<|S�||�}|�|<��cd7<|S(Ni((R"R#R*R.(	tHITSR/tcachet	cache_gettmake_keytrootR0R$R1(sOC:/Program Files (x86)/Alibaba/Aegis/PythonLoader/third_party\psutil\_compat.pyR2ls
cs�|s�r!�
||��}n|}�	j�z��|�}|dk	r��\}|\}}}}||�<||�<|�}||�<|�<||�<||�<�
�cd7<|SWd�	j�X�||�}�	j�z��\}|�krn�����krp|}	||	�<||	�<|	�}�d<|�}
d|�<|�<�|
=|	�|<n6|�}||||g}||�<|�<�|<�
�cd7<Wd�	j�X|S(Nii(tacquiretNonetrelease(R"R#R*tlinkR7t	link_prevt	link_nextR.tlasttoldroottoldkey(R3tKEYR/tNEXTtPREVtRESULTt_lenR4R5tlockR6Rt
nonlocal_rootR0R$R1(sOC:/Program Files (x86)/Alibaba/Aegis/PythonLoader/third_party\psutil\_compat.pyR2wsN
	





	




csA�j�z%t�����t���SWd�j�XdS(sReport cache statisticsN(R8t
_CacheInfoR)R:((R3R/R4RFRR0(sOC:/Program Files (x86)/Alibaba/Aegis/PythonLoader/third_party\psutil\_compat.pyt
cache_info�s

csT�j�z8�j��d}||ddg|(ddg�(Wd�j�XdS(s$Clear the cache and cache statisticsiN(R8tclearR9R:(R7(R4RFRGR0(sOC:/Program Files (x86)/Alibaba/Aegis/PythonLoader/third_party\psutil\_compat.pytcache_clear�s


(ii(iiii(tdictR-tgetR)R
R9t__wrapped__RIRKt	functoolstupdate_wrapper(R1R2RIRK(RR$(R3RAR/RBRCRDRER4R5RFR6RGR7R0R1sOC:/Program Files (x86)/Alibaba/Aegis/PythonLoader/third_party\psutil\_compat.pytdecorating_functionZs,				*<-				((RR$RQ((RR$sOC:/Program Files (x86)/Alibaba/Aegis/PythonLoader/third_party\psutil\_compat.pyRVsc(Rcs�d�}tjj��r2|�|�r.�SdS|dkrYtjjdtj�}n|scdS|jtj�}t	j
dkrtj|kr�|jdtj�ntjjdd�jtj�}t
�fd�|D��r��g}qg|D]}�|^q�}n	�g}t�}xu|D]m}tjj|�}	|	|kr+|j|	�x9|D].}
tjj||
�}|||�rc|SqcWq+q+WdS(	sJGiven a command, mode, and a PATH string, return the path which
        conforms to the given mode on the PATH, or None if there is no such
        file.

        `mode` defaults to os.F_OK | os.X_OK. `path` defaults to the result
        of os.environ.get("PATH"), or can be overridden with a custom search
        path.
        cSs5tjj|�o4tj||�o4tjj|�S(N(tostpathtexiststaccesstisdir(tfntmode((sOC:/Program Files (x86)/Alibaba/Aegis/PythonLoader/third_party\psutil\_compat.pyt
_access_check�s$tPATHtwin32itPATHEXTtc3s*|] }�j�j|j��VqdS(N(tlowertendswith(Rtext(tcmd(sOC:/Program Files (x86)/Alibaba/Aegis/PythonLoader/third_party\psutil\_compat.pys	<genexpr>�sN(RRRStdirnameR9tenvironRMtdefpathtsplittpathseptsystplatformtcurdirtinserttanytsettnormcasetaddtjoin(RaRXRSRYtpathexttfilesR`tseentdirtnormdirtthefiletname((RasOC:/Program Files (x86)/Alibaba/Aegis/PythonLoader/third_party\psutil\_compat.pyR�s8		! 		


(R	iPicCs�y(ddl}ddl}ddl}Wntk
r<|SXy:|jd|jd|jd��}|d|dfSWntk
r�|SXdS(Ni����thhit1234i(tfcntlttermioststructtImportErrortunpacktioctlt
TIOCGWINSZt	Exception(tfallbackRyRzR{tres((sOC:/Program Files (x86)/Alibaba/Aegis/PythonLoader/third_party\psutil\_compat.pyR	�s

(iPi()t__doc__tcollectionsRORRRgt__all__tversion_infoRtintRtrangeRtstrRRRRRR|t	threadingR
tdummy_threadingt
namedtupleRHtlistRtobjectRlt	frozensetRR9R'R(R)R-tFalsetshutilRtF_OKtX_OKR	(((sOC:/Program Files (x86)/Alibaba/Aegis/PythonLoader/third_party\psutil\_compat.pyt<module>sT			


	k
1


© 2026 UnknownSec