Your IP : 3.143.7.112


Current Path : /opt/alt/python35/lib64/python3.5/__pycache__/
Upload File :
Current File : //opt/alt/python35/lib64/python3.5/__pycache__/os.cpython-35.opt-2.pyc



���]���0@s�	ddlZddlZddlZejZdddddddd	d
ddd
dddddddgZdd�Zdd�Zdekr6dZ	dZ
ddlTy!ddlmZej
d�Wnek
r�YnXddlZyddlmZWnek
rYnXddlZejee��[npdekr�dZ	d Z
ddlTy!ddlmZej
d�Wnek
r�YnXddlZddlZejee��[yddlmZWq�ek
r�Yq�Xn�d!ekr�d!Z	d Z
ddlTy!ddlmZej
d�Wnek
r?YnXddlZddlZejee��[yddlmZWq�ek
r�Yq�Xned"��eejd#<dd$lmZmZmZmZmZmZmZmZ[ed%�r�e �Z!d&d'�Z"e#�Z$e"d(d)�e"d*d+�e"d,d-�e"d.d/�e"d0d1�e"d2d3�e"d4d5�e"d6d7�e"d8d9�e"d:d;�e"d<d=�e"d>d?�e"d@dA�e"dBdC�e"dBdD�e"dEd1�e$Z%e#�Z$e"d(d)�e$Z&e#�Z$e"dFdG�e"dHd+�e"dId-�e"dJdK�e"dLdM�e$j'e�e"dNdO�e"dPd1�e"dQd1�e"dRdS�edT�r�edU�r�e"dVdT�e$Z(e#�Z$e"d(d)�e"d,d-�e"d.d/�e"dWdX�e"dYd+�edZ�r%e"d[d-�e"d2d3�e"d\d1�e"d]d/�e"d.d/�e"dEd1�e"d^d/�e$Z)[$[[!["dZ*d_Z+d`Z,dadbdcdd�Z-dedf�Z.dgdh�Z/ejdddfdhg�diddbdjdk�Z0Gdldm�dm�Z1dndo�Z2ej
dk�e3ehe%krve4ehe(krvdpdiddqdbdrddsdt�Z5dudv�Z6ej
dt�ye7Wne8k
r�iZ7YnXdwdx�Z9dydz�Z:d{d|�Z;d}d~�Z<dd��Z=d�d��Z>ejdxdzd|d~d�d�g�dd�d��Z?dd�d�Z@dd�lAmBZBGd�d��d�eB�ZCy
eDZEWne8k
rnd�d��ZEYnXd�ekr�ej
d��y
eFZGWne8k
r�d�d��ZGYnXd�ekr�ej
d��d�d��ZHeH�Z7[Hdd�d��ZIe	dkZJejd��eJr^d�d��ZKeCe7jLeKeMeKeMeEeG�ZN[Kdd�d��ZOejd��d�d��ZPeP�\ZQZR[Ped��r	ed��r	ed��r	dZSd_ZTZUejd�d�d�g�d�d��ZVd�d��ZWd�d��ZXd�d��ZYd�d��ZZejd�d�d�d�g�ed��rS	d�d��Z[d�d��Z\ejd�d�g�ed��r�	d�d��Z]d�d��Z^ejd�d�g�d�d�d�d�Z_Gd�d��d��Z`d�d�ZadS)��N�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�kS)N)�globals)r	�r�'/opt/alt/python35/lib64/python3.5/os.py�_exists%srcCsAyt|j�SWn)tk
r<dd�t|�D�SYnXdS)NcSs&g|]}|ddkr|�qS)r�_r)�.0�nrrr�
<listcomp>,s	z%_get_exports_list.<locals>.<listcomp>)�list�__all__�AttributeError�dir)�modulerrr�_get_exports_list(s
r"�posix�
)�*)�_exitr&)�_have_functions�ntz
�cezno os specific module foundzos.path)rrrrrrrrr'cCs-|tkr)|tkr)tjt|�dS)N)�_globalsr'�_set�add)�str�fnrrr�_addysr/�HAVE_FACCESSAT�access�
HAVE_FCHMODAT�chmod�
HAVE_FCHOWNAT�chown�HAVE_FSTATAT�stat�HAVE_FUTIMESAT�utime�HAVE_LINKAT�link�HAVE_MKDIRAT�mkdir�
HAVE_MKFIFOAT�mkfifo�HAVE_MKNODAT�mknod�HAVE_OPENAT�open�HAVE_READLINKAT�readlink�
HAVE_RENAMEAT�rename�HAVE_SYMLINKAT�symlink�
HAVE_UNLINKAT�unlink�rmdir�HAVE_UTIMENSAT�HAVE_FCHDIR�chdir�HAVE_FCHMOD�HAVE_FCHOWN�HAVE_FDOPENDIR�listdir�HAVE_FEXECVE�execve�HAVE_FTRUNCATE�truncate�
HAVE_FUTIMENS�HAVE_FUTIMES�HAVE_FPATHCONF�pathconf�statvfs�fstatvfs�
HAVE_FSTATVFS�
HAVE_LCHFLAGS�chflags�HAVE_LCHMOD�lchown�HAVE_LCHOWN�HAVE_LUTIMES�
HAVE_LSTATZ
MS_WINDOWS��i�FcCs�tj|�\}}|s0tj|�\}}|r�|r�tj|�r�yt|||�Wntk
rtYnXt}t|t�r�ttd�}||kr�dSyt||�Wn,t	k
r�|s�tj
|�r��YnXdS)N�ASCII)r
�split�exists�makedirs�FileExistsErrorr�
isinstance�bytesr=�OSError�isdir)r	�mode�exist_ok�head�tail�cdirrrrrk�s$


rkcCs�t|�tj|�\}}|s:tj|�\}}xI|r�|r�yt|�Wntk
rlPYnXtj|�\}}q=WdS)N)rLr
riro)r	rsrtrrr�
removedirs�s

rvcCs�tj|�\}}|r;|r;tj|�r;t|�t||�tj|�\}}|r�|r�yt|�Wntk
r�YnXdS)N)r
rirjrkrGrvro)�old�newrsrtrrr�renamess


ryTc$cs�g}g}yFtdkr9t|t�r9t|�}nt|�}t|�}Wn?tk
r�}z|dk	r}||�dSWYdd}~XnXx�|D]�}	y|	j�}
Wntk
r�d}
YnX|
r�|j|	j�n|j|	j�|r�|
r�|rd}n2y|	j	�}Wntk
r;d}YnX|}|r�t
|	j|||�EdHq�W|r�|||fVtjtj
}
}xY|D]@}|||�}|s�|
|�r�t
||||�EdHq�Wn|||fVdS)Nr(FT)r	rmrn�_dummy_scandir�scandirrro�is_dir�append�
is_symlink�walkr
�islink�join)�top�topdown�onerror�followlinks�dirs�nondirs�
scandir_it�entries�error�entryr|�	walk_intor~r�r��dirname�new_pathrrrr*sJ;



	

rc@sFeZdZdd�Zdddd�Zdd�Zd	d
�ZdS)�_DummyDirEntrycCs]||_tj||�|_d|_d|_y|jdd�Wntk
rXYnXdS)N�follow_symlinksF)r	r
r��_stat�_lstatr7ro)�selfr r	rrr�__init__�s			
z_DummyDirEntry.__init__r�TcCs`|r.|jdkr't|j�|_|jS|jdkrUt|jdd�|_|jSdS)Nr�F)r�r7r
r�)r�r�rrrr7�sz_DummyDirEntry.statcCsZ|jdk	r>|j�r>|jdd�}tj|j�S|j�}tj|j�S)Nr�F)r�r~r7�st�S_ISDIR�st_mode)r�r7rrrr|�s
z_DummyDirEntry.is_dircCs"|jdd�}tj|j�S)Nr�F)r7r��S_ISLNKr�)r�r7rrrr~�sz_DummyDirEntry.is_symlinkN)�__name__�
__module__�__qualname__r�r7r|r~rrrrr��s
	r�ccs)x"t|�D]}t||�Vq
WdS)N)rSr�)r r	rrrrz�srz�.r��dir_fdccs�t|ddd|�}t|td|�}zO|s`tj|j�r{tj|t|��r{t|||||�EdHWdt	|�XdS)Nr�Fr�)
r7rC�O_RDONLYr�r�r�r
�samestat�_fwalk�close)r�r�r�r�r��orig_st�topfdrrr�fwalk�s#r�c
cs�t|�}gg}}x�|D]�}y?tjt|d|�j�rW|j|�n
|j|�Wq tk
r�y5tjt|d|dd�j�r�|j|�Wntk
r�w YnXYq Xq W|r�||||fVx�|D]�}y1t|d|d|�}	t|t	d|�}
Wn>tk
r`}z|dk	rK||�w�WYdd}~XnXzO|s�t
j|	t|
��r�t
j||�}t
|
||||�EdHWdt|
�Xq�W|s�||||fVdS)Nr�r�F)rSr�r�r7r�r}ror�rCr�r
r�r�r�r�)
r��toppathr�r�r��namesr�r�r	r��dirfd�err�dirpathrrrr�s<


$


r�cGst||�dS)N)�execv)�file�argsrrr�execlBsr�cGs(|d}t||dd�|�dS)Nrf���r�)rU)r�r��envrrr�execleIs
r�cGst||�dS)N)�execvp)r�r�rrr�execlpQsr�cGs(|d}t||dd�|�dS)Nrfr�r�)�execvpe)r�r�r�rrr�execlpeXs
r�cCst||�dS)N)�_execvpe)r�r�rrrr�asr�cCst|||�dS)N)r�)r�r�r�rrrr�isr�cCs{|dk	r!t}||f}nt}|f}t}tj|�\}}|rb|||�dSd}}d}	t|�}
tdkr�t|�}tt|
�}
x�|
D]�}tj	||�}y|||�Wq�t
k
rN}
zW|
}tj�d}|
j
t
jkr<|
j
t
jkr<|dkr<|
}|}	WYdd}
~
Xq�Xq�W|rh|j|	��|j|��dS)Nr(rg)rUr��environr
rirr	r�mapr�ro�sys�exc_info�errno�ENOENT�ENOTDIR�with_traceback)r�r�r��	exec_func�argrestrsrt�last_exc�	saved_exc�saved_tb�	path_listr �fullname�e�tbrrrr�ts<	


$r�cCsddl}|dkrt}|j���|jdt�y|jd�}Wntk
rhd}YnXtr�y|d}Wnttfk
r�YnX|dk	r�t	d��|}|dk	r�t
|t�r�t|�}WdQRX|dkr�t
}|jt�S)Nr�ignore�PATHsPATHz*env cannot contain 'PATH' and b'PATH' keys)�warningsr��catch_warnings�simplefilter�BytesWarning�get�	TypeError�supports_bytes_environ�KeyError�
ValueErrorrmrnrrrir)r�r�r��
path_listbrrrr�s.


	)�MutableMappingc@s|eZdZdd�Zdd�Zdd�Zdd�Zd	d
�Zdd�Zd
d�Z	dd�Z
dd�ZdS)�_EnvironcCsC||_||_||_||_||_||_||_dS)N)�	encodekey�	decodekey�encodevalue�decodevalue�putenv�unsetenv�_data)r��datar�r�r�r�r�r�rrrr��s						z_Environ.__init__cCsKy|j|j|�}Wn!tk
r=t|�d�YnX|j|�S)N)r�r�r�r�)r��key�valuerrr�__getitem__�s

z_Environ.__getitem__cCs?|j|�}|j|�}|j||�||j|<dS)N)r�r�r�r�)r�r�r�rrr�__setitem__�sz_Environ.__setitem__cCsR|j|�}|j|�y|j|=Wn!tk
rMt|�d�YnXdS)N)r�r�r�r�)r�r��
encodedkeyrrr�__delitem__�s

z_Environ.__delitem__ccs2t|j�}x|D]}|j|�VqWdS)N)rr�r�)r��keysr�rrr�__iter__�s
z_Environ.__iter__cCs
t|j�S)N)�lenr�)r�rrr�__len__�sz_Environ.__len__cs2djdj�fdd��jj�D���S)Nzenviron({{{}}})z, c3s9|]/\}}dj�j|��j|��VqdS)z
{!r}: {!r}N)�formatr�r�)rr�r�)r�rr�	<genexpr>�sz$_Environ.__repr__.<locals>.<genexpr>)r�r�r��items)r�r)r�r�__repr__�sz_Environ.__repr__cCs
t|�S)N)�dict)r�rrr�copy�sz
_Environ.copycCs||kr|||<||S)Nr)r�r�r�rrr�
setdefault�s
z_Environ.setdefaultN)r�r�r�r�r�r�r�r�r�r�r�r�rrrrr��s		r�cCsdS)Nr)r�r�rrr�<lambda>sr�r�cCs
t|d�S)N�)�_putenv)r�rrrr�sr�cs�tdkrldd�}|�t}�fdd�}i}xitj�D]\}}||||�<qIWn<tj���fdd���fdd	�}�}t}t|||�|tt�S)
Nr(cSs,t|t�s(tdt|�j��|S)Nzstr expected, not %s)rmr-r��typer�)r�rrr�	check_strsz!_createenviron.<locals>.check_strcs�|�j�S)N)�upper)r�)�encoderrr�sz!_createenviron.<locals>.encodekeycs8t|t�s(tdt|�j��|j�d�S)Nzstr expected, not %s�surrogateescape)rmr-r�r�r�r�)r�)�encodingrrr�sz_createenviron.<locals>.encodecs|j�d�S)Nr�)�decode)r�)r�rrr�"sz_createenviron.<locals>.decode)	r	r-r�r�r��getfilesystemencodingr�r��	_unsetenv)r�r�r�r�r�r�r)r�r�r�_createenviron
s"r�cCstj||�S)N)r�r�)r��defaultrrr�getenv0sr�r�cCs,t|t�s(tdt|�j��|S)Nzbytes expected, not %s)rmrnr�r�r�)r�rrr�_check_bytes:sr�cCstj||�S)N)�environbr�)r�r�rrr�getenvbFsr�r�cs[tj���dkr!d�nd���fdd�}��fdd�}||fS)N�mbcs�strictr�csOt|t�r|St|t�r2|j���Stdt|�j��dS)Nzexpect bytes or str, not %s)rmrnr-r�r�r�r�)�filename)r��errorsrrrUs
z_fscodec.<locals>.fsencodecsOt|t�r|St|t�r2|j���Stdt|�j��dS)Nzexpect bytes or str, not %s)rmr-rnr�r�r�r�)r)r�rrrrbs
z_fscodec.<locals>.fsdecode)r�r�)rrr)r�rr�_fscodecNs	

r�fork�spawnvr��P_WAIT�P_NOWAIT�	P_NOWAITOc
Cs�t�}|sWy0|dkr.|||�n||||�Wq�td�Yq�Xnw|tkrg|Sxdt|d�\}}t|�r�qjqjt|�r�t|�St|�r�t|�St	d��qjWdS)N�rz"Not stopped, signaled or exited???)
rr&r�waitpid�
WIFSTOPPED�WIFSIGNALED�WTERMSIG�	WIFEXITED�WEXITSTATUSro)rqr�r�r��func�pid�wpid�stsrrr�	_spawnvef�s&	
rcCst|||dt�S)N)rr�)rqr�r�rrrr�scCst||||t�S)N)rrU)rqr�r�r�rrr�spawnve�srcCst|||dt�S)N)rr�)rqr�r�rrr�spawnvp�srcCst||||t�S)N)rr�)rqr�r�r�rrr�spawnvpe�srcGst|||�S)N)r)rqr�r�rrr�spawnl�srcGs'|d}t|||dd�|�S)Nrfr�r�)r)rqr�r�r�rrr�spawnle�s
rcGst|||�S)N)r)rqr�r�rrr�spawnlp�srcGs'|d}t|||dd�|�S)Nrfr�r�)r)rqr�r�r�rrr�spawnlpe�s
r�rcCst|t�s%tdt|���|dkrAtd|��|dksY|dkretd��ddl}ddl}|dkr�|j|ddd	|jd
|�}t	|j
|j�|�S|j|ddd|jd
|�}t	|j
|j�|�SdS)
Nz&invalid cmd type (%s, expected string)r�wzinvalid mode %rrz+popen() does not support unbuffered streams�shellT�stdout�bufsize�stdin)rr)
rmr-r�r�r��
subprocess�io�Popen�PIPE�_wrap_close�
TextIOWrapperr r")�cmdrq�	bufferingr#r$�procrrrrs$				c@sXeZdZdd�Zdd�Zdd�Zdd�Zd	d
�Zdd�Zd
S)r'cCs||_||_dS)N)�_stream�_proc)r��streamr+rrrr�s	z_wrap_close.__init__cCsH|jj�|jj�}|dkr,dStdkr<|S|d>SdS)Nrr(�)r,r�r-�waitr	)r��
returncoderrrr�s
z_wrap_close.closecCs|S)Nr)r�rrr�	__enter__$sz_wrap_close.__enter__cGs|j�dS)N)r�)r�r�rrr�__exit__&sz_wrap_close.__exit__cCst|j|�S)N)�getattrr,)r�r	rrr�__getattr__(sz_wrap_close.__getattr__cCs
t|j�S)N)�iterr,)r�rrrr�*sz_wrap_close.__iter__N)	r�r�r�r�r�r2r3r5r�rrrrr's	r'cOsDt|t�s%tdt|���ddl}|j|||�S)Nz&invalid fd type (%s, expected integer)r)rm�intr�r�r$rC)�fdr��kwargsr$rrrr.s)r�r�)r�r�r�)br�r�r7r��builtin_module_namesZ_namesrrr"r	rr#r&r}�ImportError�	posixpathr
r'�extendr(Zntpathr)�modulesZos.pathrrrrrrrrrr*r/�setr+�supports_dir_fd�supports_effective_idsr,�supports_fd�supports_follow_symlinksrr
rrkrvryrr�rzrCrSr�r�r��	NameErrorr�r�r�r�r�r�r�r�_collections_abcr�r�r�r�r�r�r�r�r�r�r�rnr�r�rrrrrr	rrrrrrrrrrr'rrrrr�<module>s�	









:		















	
	










	











 �+
$!,/

		#-7





	
	
#%
	
	


?>