AlkantarClanX12

Your IP : 3.142.201.93


Current Path : /opt/alt/python310/lib64/python3.10/__pycache__/
Upload File :
Current File : //opt/alt/python310/lib64/python3.10/__pycache__/os.cpython-310.opt-2.pyc

o

6��f���@sf	ddlZddlZddlZddlmZeee�Z	ej
Zgd�Zdd�Z
dd�ZdevrndZd	Zdd
lTz
ddlmZe�d�Wn	eyJYnwddlZzdd
lmZWn	ey`YnwddlZe�ee��[nIdevr�dZdZdd
lTz
ddlmZe�d�Wn	ey�YnwddlZddlZe�ee��[zdd
lmZWn
ey�Ynwed��eejd<ddlmZmZmZm Z m!Z!m"Z"m#Z#m$Z$[e
d��r�e%�Z&dd�Z'e(�Z)e'dd�e'dd�e'dd�e'dd�e'dd�e'd d!�e'd"d#�e'd$d%�e'd&d'�e'd(d)�e'd*d+�e'd,d-�e'd.d/�e'd0d1�e'd0d2�e'd3d�e)Z*e(�Z)e'dd�e)Z+e(�Z)e'd4d5�e'd6d�e'd7d�e'd8d9�e'd8d:�e'd;d<�e)�,e�e'd=d>�e'd?d�e'd@d�e'dAdB�e
dC��r�e
dD��r�e'dEdC�e)Z-e(�Z)e'dd�e'dd�e'dd�e'dFdG�e'dHd�e
dI��r�e'dJd�e'd d!�e'dKd�e'dLd�e'dd�e'd3d�e'dMd�e)Z.[)[[&['dZ/dNZ0dOZ1d�dRdS�Z2dTdU�Z3dVdW�Z4e�gdX��d�dZd[�Z5d\d]�Z6e�d[�e7ehe*k�re8ehe-k�rd�dQdd_�d`da�Z9dbdc�Z:e�da�ddde�Z;dfdg�Z<dhdi�Z=djdk�Z>dldm�Z?dndo�Z@e�gdp��d�dqdr�ZAd�dsdt�ZBddulmCZCmDZDGdvdw�dweC�ZEdxdy�ZFeF�ZG[Fd�dzd{�ZHedkZIe�d|�eI�r�d}d~�ZJeEeGjKeJeLeJeL�ZM[Jd�dd��ZNe�d��d�d��ZOeO�\ZPZQ[Oe
d���r�e
d���s�e
d���r�dZRdNZSZTe�gd���d�d��ZUd�d��ZVd�d��ZWd�d��ZXd�d��ZYe�gd���e
d���r�d�d��ZZd�d��Z[e�d�d�g�e
d���r�d�d��Z\d�d��Z]e�d�d�g�ej^d�k�rd�d�d��Z_Gd�d��d��Z`e�d��d�d�d��Zad�d��Zbe
d���sebZcd�ec_dGd�d��d�eje�Zfedk�r1Gd�d��d��Zgd�d��ZhdSdS)��N)�_check_methods)�altsep�curdir�pardir�sep�pathsep�linesep�defpath�name�path�devnull�SEEK_SET�SEEK_CUR�SEEK_END�fsencode�fsdecode�
get_exec_path�fdopen�extsepcCs
|t�vS�N)�globals)r
�r�)/opt/alt/python310/lib64/python3.10/os.py�_exists)�
rcCs2zt|j�WStydd�t|�D�YSw)NcSsg|]
}|ddkr|�qS)r�_r)�.0�nrrr�
<listcomp>0sz%_get_exports_list.<locals>.<listcomp>)�list�__all__�AttributeError�dir)�modulerrr�_get_exports_list,s
�r$�posix�
)�*)�_exitr()�_have_functions�ntz
zno os specific module foundzos.path)rrrrr	rrrr)cCs*|tvr|tvrt�t|�dSdSdSr)�_globalsr)�_set�add)�str�fnrrr�_addhs�r0ZHAVE_FACCESSAT�accessZ
HAVE_FCHMODAT�chmodZ
HAVE_FCHOWNAT�chownZHAVE_FSTATAT�statZHAVE_FUTIMESAT�utimeZHAVE_LINKAT�linkZHAVE_MKDIRAT�mkdirZ
HAVE_MKFIFOAT�mkfifoZHAVE_MKNODAT�mknodZHAVE_OPENAT�openZHAVE_READLINKAT�readlinkZ
HAVE_RENAMEAT�renameZHAVE_SYMLINKAT�symlinkZ
HAVE_UNLINKAT�unlink�rmdirZHAVE_UTIMENSATZHAVE_FCHDIR�chdirZHAVE_FCHMODZHAVE_FCHOWNZHAVE_FDOPENDIR�listdir�scandirZHAVE_FEXECVE�execveZHAVE_FTRUNCATE�truncateZ
HAVE_FUTIMENSZHAVE_FUTIMESZHAVE_FPATHCONF�pathconf�statvfs�fstatvfsZ
HAVE_FSTATVFSZ
HAVE_LCHFLAGSZchflagsZHAVE_LCHMOD�lchownZHAVE_LCHOWNZHAVE_LUTIMESZ
HAVE_LSTATZ
MS_WINDOWS���FcCs�	t�|�\}}|st�|�\}}|r>|r>t�|�s>zt||d�Wn	ty+Ynwt}t|t�r8ttd�}||kr>dSzt||�WdSt	yX|rTt�
|�sU�YdSw)N)�exist_ok�ASCII)r�split�exists�makedirs�FileExistsErrorr�
isinstance�bytesr7�OSError�isdir)r
�moderL�head�tail�cdirrrrrP�s,	�

��rPcCsz	t|�t�|�\}}|st�|�\}}|r7|r9zt|�Wn
ty)YdSwt�|�\}}|r;|sdSdSdSdSr)r?rrNrT)r
rWrXrrr�
removedirs�s
��rZcCsv	t�|�\}}|r|rt�|�st|�t||�t�|�\}}|r7|r9zt|�WdSty6YdSwdSdSr)rrNrOrPr<rZrT)�old�newrWrXrrr�renames�s
��r])rPrZr]TcCs&	t�d||||�tt|�|||�S)Nzos.walk)�sys�audit�_walk�fspath)�top�topdown�onerror�followlinksrrr�walks;rfccs��g}g}g}zt|�}Wnty(}z|dur||�WYd}~dSd}~ww|��	zzt|�}	Wn
ty>YWnlwWn!tya}z|durP||�WYd}~Wd�dSd}~wwz|	��}
Wntysd}
Ynw|
r}|�|	j�n|�|	j�|s�|
r�|r�d}nz|	��}Wnty�d}Ynw|}|r�|�|	j�q-Wd�n1s�wY|r�|||fVtj	tj
}
}|D]}|||�}|s�|
|�s�t||||�EdHq�dS|D]}t||||�EdHq�|||fVdS)NTF)rBrT�next�
StopIteration�is_dir�appendr
�
is_symlinkr�islink�joinr`)rbrcrdre�dirs�nondirs�	walk_dirs�
scandir_it�error�entryri�	walk_intorkrlrm�dirname�new_pathrrrr`Ys|�����
������+
��
r`�.��follow_symlinks�dir_fdccs��	t�d|||||�t|t�rt|d�st|�}|s#t|d|d�}t|t|d�}z4|s;t	�
|j�rQt�
|t|��rXt||t|t�|||�EdHWt|�dSWt|�dSWt|�dSt|�w)Nzos.fwalk�	__index__Frx�rz)r^r_rR�int�hasattrrar4r:�O_RDONLY�st�S_ISDIR�st_moder�samestat�_fwalkrS�close)rbrcrdryrz�orig_st�topfdrrr�fwalk�s(� ����r�ccs��t|�}g}g}|s
|rdng}	|D]C}
|
j}|rt|�}z|
��r2|�|�|	dur1|	�|
�n|�|�WqtyVz|
��rI|�|�Wn	tySYnwYqw|r`||||fV|	durf|nt||	�D]c}z|s�|rzt||dd�}n
|\}}
|
jdd�}t	|t
|d�}
Wnty�}z|dur�||�WYd}~qkd}~wwz"|s�t�|t|
��r�t�
||�}t|
|||||�EdHWt|
�qkt|
�w|s�||||fVdSdS)NF)rzry)ryr|)rBr
rrirjrTrk�zipr4r:rrr�rmr�r�)r��toppath�isbytesrcrdryrqrnro�entriesrsr
r��dirfd�err�dirpathrrrr��sl�

�
�
������
���r�cG�	t||�dSr)�execv��file�argsrrr�execl�r�cG�"	|d}t||dd�|�dS�N���)rC�r�r��envrrr�execle!sr�cGr�r)�execvpr�rrr�execlp)r�r�cGr�r�)�execvper�rrr�execlpe0sr�cCr�r��_execvper�rrrr�9sr�cCs	t|||�dSrr�r�rrrr�A�r�)r�r�r�r�r�r�cCs|durt}||f}nt}|f}t}t�|�r!||g|�R�dSd}t|�}tdkr4t|�}tt|�}|D]A}t�	||�}z
||g|�R�Wq6t
tfy^}	z|	}
WYd}	~	q6d}	~	wtyw}	z|	}
|durm|	}WYd}	~	q6d}	~	ww|dur~|�|
�)Nr*)
rCr��environrrurr
r�maprm�FileNotFoundError�NotADirectoryErrorrT)r�r�r��	exec_func�argrest�	saved_exc�	path_listr"�fullname�e�last_excrrrr�Ls<


���r�c
Cs�	ddl}|durt}|���L|�dt�z|�d�}Wnty(d}YnwtrTz|d}Wnttfy<Ynw|durEt	d��|}|durTt
|t�rTt|�}Wd�n1s^wY|durit
}|�t�S)Nr�ignore�PATHsPATHz*env cannot contain 'PATH' and b'PATH' keys)�warningsr��catch_warnings�simplefilter�BytesWarning�get�	TypeError�supports_bytes_environ�KeyError�
ValueErrorrRrSrr	rNr)r�r�r��
path_listbrrrrls:	
�����
r)�MutableMapping�Mappingc@sleZdZdd�Zdd�Zdd�Zdd�Zd	d
�Zdd�Zd
d�Z	dd�Z
dd�Zdd�Zdd�Z
dd�ZdS)�_EnvironcCs"||_||_||_||_||_dSr)�	encodekey�	decodekey�encodevalue�decodevalue�_data)�self�datar�r�r�r�rrr�__init__�s

z_Environ.__init__cCs8z
|j|�|�}Wntyt|�d�w|�|�Sr)r�r�r�r��r��key�valuerrr�__getitem__�s
�
z_Environ.__getitem__cCs,|�|�}|�|�}t||�||j|<dSr)r�r��putenvr�r�rrr�__setitem__�s


z_Environ.__setitem__cCs:|�|�}t|�z|j|=WdStyt|�d�wr)r��unsetenvr�r�)r�r��
encodedkeyrrr�__delitem__�s

�z_Environ.__delitem__ccs&�t|j�}|D]}|�|�VqdSr)rr�r�)r��keysr�rrr�__iter__�s
�
�z_Environ.__iter__cC�
t|j�Sr)�lenr��r�rrr�__len__�rz_Environ.__len__cs$d�d��fdd��j��D���S)Nzenviron({{{}}})z, c3s,�|]\}}d���|���|��VqdS)z
{!r}: {!r}N)�formatr�r�)rr�r�r�rr�	<genexpr>�s� �z$_Environ.__repr__.<locals>.<genexpr>)r�rmr��itemsr�rr�r�__repr__�s

��z_Environ.__repr__cCst|�Sr)�dictr�rrr�copy�sz
_Environ.copycCs||vr|||<||Srrr�rrr�
setdefault�sz_Environ.setdefaultcCs|�|�|Sr)�update)r��otherrrr�__ior__�s
z_Environ.__ior__cCs$t|t�stSt|�}|�|�|Sr�rRr��NotImplementedr�r��r�r�r\rrr�__or__��


z_Environ.__or__cCs$t|t�stSt|�}|�|�|Srr�r�rrr�__ror__�r�z_Environ.__ror__N)�__name__�
__module__�__qualname__r�r�r�r�r�r�r�r�r�r�r�r�rrrrr��s	r�cs�tdkr$dd�}|�t}�fdd�}i}t��D]
\}}||||�<qnt����fdd���fdd	�}�}t}t|||�|�S)
Nr*cS� t|t�stdt|�j��|S)N�str expected, not %s)rRr.r��typer��r�rrr�	check_str��
z!_createenviron.<locals>.check_strcs�|���Sr)�upper)r�)�encoderrr���z!_createenviron.<locals>.encodekeycs(t|t�stdt|�j��|��d�S)Nr��surrogateescape)rRr.r�r�r�r�r���encodingrrr��s
z_createenviron.<locals>.encodecs|��d�S)Nr�)�decoder�r�rrr��r�z_createenviron.<locals>.decode)r
r.r�r�r^�getfilesystemencodingr�)r�r�r�r�r�r�r)r�r�r�_createenviron�s$��r�cC�	t�||�Sr)r�r��r��defaultrrr�getenv�r�)r�r�cCr�)Nzbytes expected, not %s)rRrSr�r�r�r�rrr�_check_bytesr�r�cCr�r)�environbr�r�rrr�getenvbr�r�)r�r�cs4t���t�����fdd�}��fdd�}||fS)Nc�$	t|�}t|t�r|����S|Sr)rarRr.r���filename�r��errorsrrr%�

z_fscodec.<locals>.fsencodecr�r)rarRrSr�rrrrr1rz_fscodec.<locals>.fsdecode)r^r��getfilesystemencodeerrors)rrrrr�_fscodec!s
r�fork�spawnvr�)�P_WAIT�P_NOWAIT�	P_NOWAITOcCs�t|ttf�std��|r|dstd��t�}|s;z|dur%|||�n	||||�WdSWdStd�YdS|tkrA|S	t|d�\}}t	|�rNqAt
|�S)Nzargv must be a tuple or a listrz"argv first element cannot be empty�)rR�tuplerr�r�rr(r
�waitpid�
WIFSTOPPED�waitstatus_to_exitcode)rVr�r�r��func�pid�wpid�stsrrr�	_spawnvefNs(�rcC�	t|||dt�Sr)rr��rVr�r�rrrrir�cC�	t||||t�Sr)rrC�rVr�r�r�rrr�spawnver�rcCrr)rr�rrrr�spawnvp~rrcCrr)rr�rrrr�spawnvpe�rr)rrrrcG�	t|||�Sr)rrrrr�spawnl�srcG� 	|d}t|||dd�|�Sr�)rrrrr�spawnle��r!cGrr)rrrrr�spawnlp�sr#cGr r�)rrrrr�spawnlpe�r"r$�vxworks�rr�cCs�t|t�s
tdt|���|dvrtd|��|dks|dur#td��ddl}ddl}|dkr@|j|dd|j|d�}t	|j
|�S|j|dd|j|d	�}t	|j|�S)
Nz&invalid cmd type (%s, expected string))r&�wzinvalid mode %rrz+popen() does not support unbuffered streamsr&T)�shell�text�stdout�bufsize)r(r)�stdinr+)rRr.r�r�r��
subprocess�io�Popen�PIPE�_wrap_closer*r,)�cmdrV�	bufferingr-r.�procrrr�popen�s(
��r5c@s<eZdZdd�Zdd�Zdd�Zdd�Zd	d
�Zdd�Zd
S)r1cCs||_||_dSr)�_stream�_proc)r��streamr4rrrr��s
z_wrap_close.__init__cCs4|j��|j��}|dkrdStdkr|S|d>S)Nrr*�)r6r�r7�waitr
)r��
returncoderrrr��s

z_wrap_close.closecC�|Srrr�rrr�	__enter__��z_wrap_close.__enter__cG�|��dSr�r��r�r�rrr�__exit__�r�z_wrap_close.__exit__cCst|j|�Sr)�getattrr6)r�r
rrr�__getattr__�r�z_wrap_close.__getattr__cCr�r)�iterr6r�rrrr��rz_wrap_close.__iter__N)	r�r�r�r�r�r=rBrDr�rrrrr1�s	r1cOsRt|t�s
tdt|���ddl}d|vr|�|�}|j||||g|�Ri|��S)Nz&invalid fd type (%s, expected integer)r�b)rRr}r�r�r.�
text_encodingr:)�fdrVr3r�r��kwargsr.rrrrs

rcCs~	t|ttf�r
|St|�}z|�|�}Wnty)t|d�r"�td|j��wt|ttf�r3|Std�	|jt|�j���)N�
__fspath__z/expected str, bytes or os.PathLike object, not z7expected {}.__fspath__() to return str or bytes, not {})
rRr.rSr�rJr!r~r�r�r�)r�	path_type�	path_reprrrr�_fspaths(
����rMrac@s0eZdZ	ejdd��Zedd��Zee�Z	dS)�PathLikecCs	t�r)�NotImplementedErrorr�rrrrJ3szPathLike.__fspath__cCs|tur	t|d�StS)NrJ)rNrr�)�cls�subclassrrr�__subclasshook__8s
zPathLike.__subclasshook__N)
r�r�r��abc�abstractmethodrJ�classmethodrR�GenericAlias�__class_getitem__rrrrrN/s

rNc@s4eZdZdd�Zdd�Zdd�Zdd�Zd	d
�ZdS)�_AddedDllDirectorycCs||_||_||_dSr)r�_cookie�_remove_dll_directory)r�r�cookieZremove_dll_directoryrrrr�Cs
z_AddedDllDirectory.__init__cCs|�|j�d|_dSr)rZrYrr�rrrr�Gs
z_AddedDllDirectory.closecCr<rrr�rrrr=Jr>z_AddedDllDirectory.__enter__cGr?rr@rArrrrBLr�z_AddedDllDirectory.__exit__cCs|jr	d�|j�SdS)Nz<AddedDllDirectory({!r})>z<AddedDllDirectory()>)rr�r�rrrr�Nsz_AddedDllDirectory.__repr__N)r�r�r�r�r�r=rBr�rrrrrXBsrXcCs"	ddl}|�|�}t|||j�S)Nr)r*Z_add_dll_directoryrXrZ)rr*r[rrr�add_dll_directorySs	
�r\)rKF)TNF)rwTNr)r&r�)r&r�N)irSr^r4r��_collections_abcrr�rr}rV�builtin_module_namesZ_namesr rr$r
rr%r(rj�ImportError�	posixpathrr)�extendr*Zntpath�modulesZos.pathrrrrr	rrrrr+r0�setr,�supports_dir_fd�supports_effective_idsr-�supports_fd�supports_follow_symlinksr
rrrPrZr]rfr`r:rBr�r�r�r�r�r�r�r�r�rr�r�r�r�r�r�r�r�r�rSr�r�rrrr	r
rrrrrrrr!r#r$�platformr5r1rrMrar��ABCrNrXr\rrrr�<module>sr����
(











































 
?
R1
8		

 -G

�


	

	






�