Dre4m Shell
Server IP : 85.214.239.14  /  Your IP : 216.73.216.27
Web Server : Apache/2.4.65 (Debian)
System : Linux h2886529.stratoserver.net 4.9.0 #1 SMP Mon Sep 30 15:36:27 MSK 2024 x86_64
User : www-data ( 33)
PHP Version : 8.2.29
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : ON  |  Pkexec : OFF
Directory :  /proc/2/root/proc/self/root/usr/share/python/debpython/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ HOME SHELL ]     

Current File : /proc/2/root/proc/self/root/usr/share/python/debpython/tools.pyc
�
�O�Xc@�s�ddlmZddlZddlZddlZddlZddlmZddlmZddl	m
Z
mZmZm
Z
ddlmZddlmZmZddlmZmZmZeje�Zejd	�Zejd
�Zejd�Zejdeej�Zejd
eej�Z de"d�Z#d�Z$d�Z%dd�Z&d�Z'd�Z(d�Z)de*fd��YZ+d�Z,d�Z-dS(i����(twith_statementN(tdumps(tglob(texiststisdirtjointsplit(trmtree(tPIPEtPopen(t
RANGE_PATTERNtgetvertget_requested_versionss/(.*?)(-py\d\.\d(?:-[^.]*)?)?(\.egg-info|\.pth)$sA^#!\s*(.*?/bin/.*?)(python(2\.\d+)?(?:-dbg)?)(?:\s(.*))?[$\r\n].*sNEEDED.*libpython(\d\.\d)s�
    (?P<pattern>.+?)  # file pattern
    (?:\s+  # optional Python module name:
    (?P<module>[A-Za-z][A-Za-z0-9_.]*)?
    )?
    \s*  # optional version range:
    (?P<vrange>%s)?$
s^
    (?P<pattern>.+?)  # file pattern
    \s*  # optional version range:
    (?P<vrange>%s)?$
cC�s�t|t�r1td�|jd�D��}n|d	krJd|}n
d|}|rgd|}n|r�d||f}n|S(
s�Return path to site-packages directory.

    >>> sitedir((2, 5))
    '/usr/lib/python2.5/site-packages/'
    >>> sitedir((2, 7), 'python-foo', True)
    'debian/python-foo/usr/lib/debug/usr/lib/python2.7/dist-packages/'
    cs�s|]}t|�VqdS(N(tint(t.0ti((s$/usr/share/python/debpython/tools.pys	<genexpr>>st.iis#/usr/lib/python%d.%d/dist-packages/s#/usr/lib/python%d.%d/site-packages/s/usr/lib/debug%ssdebian/%s%s(ii(t
isinstancet
basestringttupleR(tversiontpackagetgdbtpath((s$/usr/share/python/debpython/tools.pytsitedir5s"


cC�si|jd�}|jd�}x&|d|dkrF|d=|d=q!Wdjdgt|�d|�S(s~Return relative path.

    >>> relpath('/usr/share/python-foo/foo.py', '/usr/bin/foo', )
    '../share/python-foo/foo.py'
    t/is..i(RRtlen(ttargettlinktttl((s$/usr/share/python/debpython/tools.pytrelpathMs
cC�stjt||�|�S(sCreate relative symlink.(tostsymlinkR(RR((s$/usr/share/python/debpython/tools.pytrelative_symlinkZsc	C�sKy?t|��}|j�}WdQX|s>tjd|�dSWn"tk
rctjd|�tSXtj	|d�}|s�dS|s�|j
�\}}}}|dkr�d|}n|dkr�d}n|r�|r�|d	|7}q�n|rGtjd
||d�t|d��)}|jd|�|j
|d
�WdQXntS(smNormalize file's shebang.

    :param replacement: new shebang command (path to interpreter and options)
    Ns$fix_shebang: ignoring empty file: %sscannot open %sis/usr/bins/usr/bin/%stpython2s/usr/bin/pythons %ssreplacing shebang in %s (%s)tws#! %s
i(topent	readlinestlogtdebugtNonetIOErrorterrortFalset
SHEBANG_REtmatchtgroupstinfotwritet
writelinestTrue(	tfpathtreplacementtfptfcontentR.RtinterpreterRtargv((s$/usr/share/python/debpython/tools.pytfix_shebang_s4

	cC�s�y�t|��~}|jd�}tj|�}|s:dS|j�}|dd!dkr�|dr{|dt|d�fS|ddfSWdQXWn!tk
r�tj	d|�nXdS(spCheck file's shebang.

    :rtype: tuple
    :returns: pair of Python interpreter string and Python version
    i iiiNscannot open %s(NN(
R%treadR-R.R)R/RR*R'R+(R4R6tdataR.tres((s$/usr/share/python/debpython/tools.pyt
shebang2pyver�s

cC�sXd|}t|dtdt�}tj|jj��}|rTt|j�d�SdS(shReturn libpython version file is linked to or None.

    :rtype: tuple
    :returns: Python version
    sreadelf -Wd '%s'tstdouttshelliN(	R	RR3tSHAREDLIB_REtsearchR?R;RR/(R4tcmdtprocessR.((s$/usr/share/python/debpython/tools.pytso2pyver�s

cC�sGtj|�}|rC|jd�dk	rCdj|jdd��S|S(sRemove Python version and platform name from Egg files/dirs.

    >>> clean_egg_name('python_pipeline-0.1.3_py3k-py3.1.egg-info')
    'python_pipeline-0.1.3_py3k.egg-info'
    >>> clean_egg_name('Foo-1.2-py2.7-linux-x86_64.egg-info')
    'Foo-1.2.egg-info'
    itiiN(t
EGGnPTH_RER.tgroupR)R(tnameR.((s$/usr/share/python/debpython/tools.pytclean_egg_name�stmemoizecB�seZd�Zd�ZRS(cC�s||_i|_dS(N(tfunctcache(tselfRL((s$/usr/share/python/debpython/tools.pyt__init__�s	cO�sHt||f�}||jkr=|j||�|j|<n|j|S(N(RRMRL(RNtargstkwargstkey((s$/usr/share/python/debpython/tools.pyt__call__�s(t__name__t
__module__RORS(((s$/usr/share/python/debpython/tools.pyRK�s	cC�s�t}d|}t|�s |St|�}x�tj|dd�D]m}|sB|jd�rdqBntj|�}|s�t}t	j
d||�qBn|j�}|dr�|djdd�|d<n|t|d	�@}|s�t	j
d
||�qBnt|d�}|s7t}t	jd||d�qBnxu|D]m}	|	jd
�}	|dr}t|dt|	�d�}
n"|	jd�r�|	d}
n|	}
x	|D]}tt||�|
�}t|�d}
t|
�sytj|
�Wqtk
rt	jd|
�tSXnt|�rfytj|�Wqftk
rbt}t	jd|�q�qfXnytj|	|�Wq�tk
r�t}t	jd|	|
�q�Xq�Wq>WqBW|S(sDInstall local files listed in pkg.pyinstall files as public modules.s./debian/%s.pyinstalltencodingsutf-8t#s#%s.pyinstall: unrecognized line: %stmoduleRRtvranges.%s.pyinstall: no matching versions for line %stpatterns %s.pyinstall: file not found: %ss/.isdebian/iiscannot create %s directoryscannot replace %s filescannot copy %s file to %s(R3RRtcodecsR%t
startswitht
INSTALL_RER.R,R'twarnt	groupdicttreplaceR(RR+tlstripRRRR tmakedirst	ExceptiontremoveR(RRYtstatustsrcfpathtversionstlinetdetailstmyverstfilesR4tdstnameRtdstfpathtdstdir((s$/usr/share/python/debpython/tools.pyt	pyinstall�sr
	

	
	

 





#c	C�s�t}d|}t|�s |St|�}x�tj|dd�D]�}|sB|jd�rdqBntj|�}|s�t}t	j
d||�qBn|j�}|t|d�@}|s�t	jd||�qBnx�|D]�}t
t||�|d�}	|	s't	jd	|||d�q�nx�|	D]�}
t|
�rzyt|
�Wq�tk
rv}t}t	j|�q�Xq.ytj|
�Wq.ttfk
r�}t}t	j|�q.Xq.Wq�WqBW|S(
s2Remove public modules listed in pkg.pyremove file.s./debian/%s.pyremoveRVsutf-8RWs"%s.pyremove: unrecognized line: %sRYs-%s.pyremove: no matching versions for line %sRZs/%s.pyremove: nothing to remove: python%d.%d, %s(R3RRR[R%R\t	REMOVE_RER.R,R'R^R_R(RRRRRcR+R RdR*tOSError(RRYReRfRgRhRiRjRRkR4te((s$/usr/share/python/debpython/tools.pytpyremove�sN
	
	

	
(.t
__future__RR[tloggingR tretcPickleRRtos.pathRRRRtshutilRt
subprocessRR	tdebpython.versionR
RRt	getLoggerRTR'tcompileRGR-RAtVERBOSER]RpR)R,RRR"R:R>RERJtobjectRKRoRs(((s$/usr/share/python/debpython/tools.pyt<module>s8"	
	$				?

Anon7 - 2022
AnonSec Team