Your IP : 3.129.70.138


Current Path : /opt/alt/python39/lib64/python3.9/__pycache__/
Upload File :
Current File : //opt/alt/python39/lib64/python3.9/__pycache__/os.cpython-39.opt-2.pyc

a

R�f���@sPddlZddlZddlZddlmZeee�Z	ej
Zgd�Zdd�Z
dd�Zdevr�dZd	Zdd
lTzddlmZe�d�Wney�Yn0ddlZzdd
lmZWney�Yn0ddlZe�ee��[n�dev�rldZdZdd
lTzddlmZe�d�Wne�y"Yn0ddlZddlZe�ee��[zdd
lmZWne�yhYn0ned��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��re
dD��re'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�r8e8ehe-k�r8d�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�d�d�d��Z^Gd�d��d��Z_d�d��Z`d�d��Zae
d���seaZbd�eb_cGd�d��d�ejd�Zeedk�rLGd�d��d��Zfd�d��ZgdS)��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�popen�extsepcCs
|t�vS�N)�globals)r
�r�'/opt/alt/python39/lib64/python3.9/os.py�_exists)srcCs6zt|j�WSty0dd�t|�D�YS0dS)NcSsg|]}|ddkr|�qS)r�_r)�.0�nrrr�
<listcomp>0�z%_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|�dSr)�_globalsr*�_set�add)�str�fnrrr�_addhsr1ZHAVE_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�|�\}}|s t�|�\}}|rz|rzt�|�szzt||d�WntyTYn0t}t|t�rnttd�}||krzdSzt||�Wn"t	y�|r�t�
|�s��Yn0dS)N)�exist_ok�ASCII)r�split�exists�makedirs�FileExistsErrorr�
isinstance�bytesr8�OSError�isdir)r
�moderM�head�tail�cdirrrrrQ�s$


rQcCsht|�t�|�\}}|s(t�|�\}}|rd|rdzt|�WntyRYqdYn0t�|�\}}q(dSr)r@rrOrU)r
rXrYrrr�
removedirs�s
r[cCslt�|�\}}|r(|r(t�|�s(t|�t||�t�|�\}}|rh|rhzt|�WntyfYn0dSr)rrOrPrQr=r[rU)�old�newrXrYrrr�renames�s
r^)rQr[r^TcCs$t�d||||�tt|�|||�S)Nzos.walk)�sys�audit�_walk�fspath)�top�topdown�onerror�followlinksrrr�walks;rgccsg}g}g}zt|�}Wn6tyN}z|dur8||�WYd}~dSd}~00|��z,zt|�}	Wnty�YW�q`Yn0WnBty�}z*|dur�||�WYd}~Wd�dSd}~00z|	��}
Wnt�y�d}
Yn0|
�r|�|	j�n|�|	j�|sX|
rX|�r"d}n,z|	��}Wnt�yFd}Yn0|}|rX|�|	j�qXWd�n1�sv0Y|�r�|||fVtj	tj
}
}|D]4}|||�}|�s�|
|��s�t||||�EdH�q�n,|D]}t||||�EdH�q�|||fVdS)NFT)rCrU�next�
StopIteration�is_dir�appendr
�
is_symlinkr�islink�joinra)rcrdrerf�dirs�nondirs�	walk_dirs�
scandir_it�error�entryrj�	walk_intorlrmrn�dirname�new_pathrrrraXs\$

.
ra�.��follow_symlinks�dir_fdccs�t�d|||||�t|t�r(t|d�s0t|�}|sBt|d|d�}t|t|d�}zJ|srt	�
|j�r�t�
|t|��r�t||t|t�|||�EdHWt|�n
t|�0dS)Nzos.fwalk�	__index__Fry�r{)r_r`rS�int�hasattrrbr5r;�O_RDONLY�st�S_ISDIR�st_moder�samestat�_fwalkrT�close)rcrdrerzr{�orig_st�topfdrrr�fwalk�s!��r�ccs�t|�}g}g}|s|rdng}	|D]�}
|
j}|r:t|�}z4|
��rb|�|�|	durl|	�|
�n
|�|�Wq$ty�z|
��r�|�|�Wnty�Yn0Yq$0q$|r�||||fV|	dur�|nt||	�D]�}z@|�s
|r�t||dd�}n|\}}
|
jdd�}t	|t
|d�}
WnDt�y^}z*|du�r>||�WYd}~q�WYd}~n
d}~00zH|�szt�|t|
���r�t�
||�}t|
|||||�EdHWt|
�q�t|
�0q�|�s�||||fVdS)NF)r{rz)rzr})rCr
rrjrkrUrl�zipr5r;r�rr�rnr�r�)r��toppath�isbytesrdrerzrrrorp�entriesrtr
r��dirfd�err�dirpathrrrr��sV

"�r�cGst||�dSr)�execv��file�argsrrr�execlsr�cGs |d}t||dd�|�dS�N���)rD�r�r��envrrr�execle sr�cGst||�dSr)�execvpr�rrr�execlp(sr�cGs |d}t||dd�|�dSr�)�execvper�rrr�execlpe/sr�cCst||�dSr��_execvper�rrrr�8sr�cCst|||�dSrr�r�rrrr�@sr�)r�r�r�r�r�r�cCs|durt}||f}nt}|f}t}t�|�rB||g|�R�dSd}t|�}tdkrht|�}tt|�}|D]�}t�	||�}z||g|�R�Wqlt
tfy�}	z|	}
WYd}	~	qld}	~	0ty�}	z|	}
|dur�|	}WYd}	~	qld}	~	00ql|dur�|�|
�dS)Nr+)
rDr��environrrvrr
r�maprn�FileNotFoundError�NotADirectoryErrorrU)r�r�r��	exec_func�argrest�	saved_exc�	path_listr#�fullname�e�last_excrrrr�Ks6


r�c
Cs�ddl}|durt}|����|�dt�z|�d�}WntyNd}Yn0tr�z|d}WnttfyvYn0|dur�t	d��|}|dur�t
|t�r�t|�}Wd�n1s�0Y|dur�t
}|�t�S)Nr�ignore�PATHsPATHz*env cannot contain 'PATH' and b'PATH' keys)�warningsr��catch_warnings�simplefilter�BytesWarning�get�	TypeError�supports_bytes_environ�KeyError�
ValueErrorrSrTrr	rOr)r�r�r��
path_listbrrrrks0


�&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__cCs<z|j|�|�}Wnty0t|�d�Yn0|�|�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|=Wnty:t|�d�Yn0dSr)r��unsetenvr�r�)r�r��
encodedkeyrrr�__delitem__�s
z_Environ.__delitem__ccs$t|j�}|D]}|�|�VqdSr)r r�r�)r��keysr�rrr�__iter__�s
z_Environ.__iter__cCs
t|j�Sr)�lenr��r�rrr�__len__�sz_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�rnr��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�rSr��NotImplementedr�r��r�r�r]rrr�__or__�s


z_Environ.__or__cCs$t|t�stSt|�}|�|�|Srr�r�rrr�__ror__�s


z_Environ.__ror__N)�__name__�
__module__�__qualname__r�r�r�r�r�r�r�r�r�r�r�r�rrrrr��s	r�cs�tdkrHdd�}|�t}�fdd�}i}t��D]\}}||||�<q0n(t����fdd���fdd	�}�}t}t|||�|�S)
Nr+cSs t|t�stdt|�j��|S)N�str expected, not %s)rSr/r��typer��r�rrr�	check_str�s
z!_createenviron.<locals>.check_strcs�|���Sr)�upper)r�)�encoderrr��sz!_createenviron.<locals>.encodekeycs(t|t�stdt|�j��|��d�S)Nr��surrogateescape)rSr/r�r�r�r�r���encodingrrr��s
z_createenviron.<locals>.encodecs|��d�S)Nr�)�decoder�r�rrr��sz_createenviron.<locals>.decode)r
r/r�r�r_�getfilesystemencodingr�)r�r�r�r�r�r�r)r�r�r�_createenviron�s"�r�cCst�||�Sr)r�r��r��defaultrrr�getenvsr�)r�r�cCs t|t�stdt|�j��|S)Nzbytes expected, not %s)rSrTr�r�r�r�rrr�_check_bytes
s
r�cCst�||�Sr)�environbr�r�rrr�getenvbsr�)r�r�cs4t���t�����fdd�}��fdd�}||fS)Ncs&t|�}t|t�r|����S|SdSr)rbrSr/r���filename�r��errorsrrr$s
z_fscodec.<locals>.fsencodecs&t|�}t|t�r|����S|SdSr)rbrSrTr�r�r�rrr0s
z_fscodec.<locals>.fsdecode)r_r��getfilesystemencodeerrors)rrrr�r�_fscodec s
r��fork�spawnvr�)�P_WAIT�P_NOWAIT�	P_NOWAITOcCs�t|ttf�std��|r"|ds*td��t�}|spz$|durJ|||�n||||�Wq�td�Yq�0n,|tkr||St|d�\}}t	|�r�q|t
|�SdS)Nzargv must be a tuple or a listrz"argv first element cannot be empty�)rS�tupler r�r�r�r)r��waitpid�
WIFSTOPPED�waitstatus_to_exitcode)rWr�r�r��func�pid�wpid�stsrrr�	_spawnvefMs$r	cCst|||dt�Sr)r	r��rWr�r�rrrr�hscCst||||t�Sr)r	rD�rWr�r�r�rrr�spawnveqsrcCst|||dt�Sr)r	r�r
rrr�spawnvp}sr
cCst||||t�Sr)r	r�rrrr�spawnvpe�sr)r�rr
rcGst|||�Sr)r�r
rrr�spawnl�srcGs|d}t|||dd�|�Sr�)rrrrr�spawnle�srcGst|||�Sr)r
r
rrr�spawnlp�srcGs|d}t|||dd�|�Sr�)rrrrr�spawnlpe�sr�rr�cCs�t|t�stdt|���|dvr.td|��|dks>|durFtd��ddl}ddl}|dkr�|j|d|j|d�}t	|�
|j�|�S|j|d|j|d	�}t	|�
|j�|�SdS)
Nz&invalid cmd type (%s, expected string))r�wzinvalid mode %rrz+popen() does not support unbuffered streamsrT)�shell�stdout�bufsize)r�stdinr)
rSr/r�r�r��
subprocess�io�Popen�PIPE�_wrap_close�
TextIOWrapperrr)�cmdrW�	bufferingrr�procrrrr�s(
��rc@s<eZdZdd�Zdd�Zdd�Zdd�Zd	d
�Zdd�Zd
S)rcCs||_||_dSr)�_stream�_proc)r��streamr!rrrr��sz_wrap_close.__init__cCs8|j��|j��}|dkr dStdkr,|S|d>SdS)Nrr+�)r"r�r#�waitr
)r��
returncoderrrr��s

z_wrap_close.closecCs|Srrr�rrr�	__enter__�sz_wrap_close.__enter__cGs|��dSr�r��r�r�rrr�__exit__�sz_wrap_close.__exit__cCst|j|�Sr)�getattrr")r�r
rrr�__getattr__�sz_wrap_close.__getattr__cCs
t|j�Sr)�iterr"r�rrrr��sz_wrap_close.__iter__N)	r�r�r�r�r�r(r+r-r�rrrrr�s	rcOs:t|t�stdt|���ddl}|j|g|�Ri|��S)Nz&invalid fd type (%s, expected integer)r)rSr~r�r�rr;)�fdr��kwargsrrrrr�s
rcCs�t|ttf�r|St|�}z|�|�}Wn.tyVt|d�rD�ntd|j��Yn0t|ttf�rj|Std�	|jt|�j���dS)N�
__fspath__z/expected str, bytes or os.PathLike object, not z7expected {}.__fspath__() to return str or bytes, not {})
rSr/rTr�r1r"rr�r�r�)r�	path_type�	path_reprrrr�_fspaths"
��r4rbc@s.eZdZejdd��Zedd��Zee�Z	dS)�PathLikecCst�dSr)�NotImplementedErrorr�rrrr1,szPathLike.__fspath__cCs|turt|d�StS)Nr1)r5rr�)�cls�subclassrrr�__subclasshook__1s
zPathLike.__subclasshook__N)
r�r�r��abc�abstractmethodr1�classmethodr9�GenericAlias�__class_getitem__rrrrr5(s


r5c@s4eZdZdd�Zdd�Zdd�Zdd�Zd	d
�ZdS)�_AddedDllDirectorycCs||_||_||_dSr)r�_cookie�_remove_dll_directory)r�r�cookieZremove_dll_directoryrrrr�<sz_AddedDllDirectory.__init__cCs|�|j�d|_dSr)rAr@rr�rrrr�@sz_AddedDllDirectory.closecCs|Srrr�rrrr(Csz_AddedDllDirectory.__enter__cGs|��dSrr)r*rrrr+Esz_AddedDllDirectory.__exit__cCs|jrd�|j�SdS)Nz<AddedDllDirectory({!r})>z<AddedDllDirectory()>)rr�r�rrrr�Gsz_AddedDllDirectory.__repr__N)r�r�r�r�r�r(r+r�rrrrr?;s
r?cCs ddl}|�|�}t|||j�S)Nr)r+Z_add_dll_directoryr?rA)rr+rBrrr�add_dll_directoryLs

�rC)rLF)TNF)rxTN)N)N)N)N)rr�)hr:r_r5r��_collections_abcrr�r r~r=�builtin_module_namesZ_namesr!rr%r
rr&r)rk�ImportError�	posixpathrr*�extendr+Zntpath�modulesZos.pathrrrrr	rrrrr,r1�setr-�supports_dir_fd�supports_effective_idsr.�supports_fd�supports_follow_symlinksr
rrrQr[r^rgrar;rCr�r�r�r�r�r�r�r�r�rr�r�r�r�r�r�r�r�r�rTr�r�r�rrr�r�r�r	r�rr
rrrrrrrrr4rbr��ABCr5r?rCrrrr�<module>s`

(











































 
>R
18
		
 
-G

�


	

	


	



?>