404

[ Avaa Bypassed ]




Upload:

Command:

elspacio@3.15.239.95: ~ $
�
i fޛ�1@s�dZddlZddlZddlZddlmZddlZddlZddlZddl	Z	yddl
Z
[
dZWnek
r�dZYnXyddl
mZWnek
r�dZYnXyddlmZWnek
r�dZYnXdd	d
ddd
ddddddddddddddddddd gZGd!d�de�ZGd"d �d e�ZGd#d�de�ZGd$d�de�ZGd%d&�d&e�ZGd'd(�d(e�Zd}d+d�Zd,d-�Zd.dd/d	�Zd.dd0d
�Zeed1�r4d.dd2d3�Znd4d3�Zd.dd5d�Z d.dd6d�Z!d.dd7d
�Z"d8d�Z#dde"dd9d�Z$d:d;�Z%d<d=�Z&ej'ejej(ej)hej*ko�ej+ej,ko�ejej-kZ.ddd>d�Z/e.e/_0d?d@�Z1dAd�Z2dBdC�Z3dDdE�Z4dFdG�Z5dHddddddIdJ�Z6dddKdL�Z7ddddMdN�Z8ie6d~gdPfdQ6e6dgdRfdS6e8gdTfdU6Z9er�e6d�gdWfe9dX<ndYd�Z:ddZd[d�Z;d\d�Z<dddddddd]d�Z=d^d�Z>d_d`�Z?ddZdad�Z@dbd�ZAdcdd�ZBdedf�ZCdgdh�ZDididjgeDgdPfdQ6dkgeDgdRfdS6dlgeCgdTfdU6ZEerdmgeDgdWfeEdX<ndndo�ZFdddpd�ZGeedq�raejHdr�ejIdsdt�ZJdudr�ZKnIejLdvkr�ddlMZMejHdr�ejIdsdt�ZJdwdr�ZKndddxd�ZNd�d{d�ZOejPejQBdd|d�ZRdS)�z�Utility functions for copying and archiving files and directory trees.

XXX The functions here don't copy the resource fork or other metadata on Mac.

�N)�abspathTF)�getpwnam)�getgrnam�copyfileobj�copyfile�copymode�copystat�copy�copy2�copytree�move�rmtree�Error�SpecialFileError�	ExecError�make_archive�get_archive_formats�register_archive_format�unregister_archive_format�get_unpack_formats�register_unpack_format�unregister_unpack_format�unpack_archive�ignore_patterns�chown�which�get_terminal_size�
SameFileErrorc@seZdZdS)rN)�__name__�
__module__�__qualname__�r!r!�+/opt/alt/python34/lib64/python3.4/shutil.pyr+sc@seZdZdZdS)rz5Raised when source and destination are the same file.N)rrr �__doc__r!r!r!r"r.sc@seZdZdZdS)rz|Raised when trying to do a kind of operation (e.g. copying) which is
    not supported on a special file (e.g. a named pipe)N)rrr r#r!r!r!r"r1sc@seZdZdZdS)rz+Raised when a command could not be executedN)rrr r#r!r!r!r"r5sc@seZdZdZdS)�	ReadErrorz%Raised when an archive cannot be readN)rrr r#r!r!r!r"r$8sr$c@seZdZdZdS)�
RegistryErrorzWRaised when a registry operation with the archiving
    and unpacking registeries failsN)rrr r#r!r!r!r"r%;sr%�icCs1x*|j|�}|sPn|j|�qWdS)z=copy data from file-like object fsrc to file-like object fdstN)�read�write)�fsrc�fdstZlengthZbufr!r!r"r@s
cCsttjd�rEytjj||�SWqEtk
rAdSYqEXntjjtjj|��tjjtjj|��kS)N�samefileF)�hasattr�os�pathr+�OSError�normcaser)�src�dstr!r!r"�	_samefileHs
r3�follow_symlinkscCst||�r*tdj||���nxa||gD]S}ytj|�}Wntk
rdYq7Xtj|j�r7td|��q7q7W|r�tj	j
|�r�tjtj|�|�n=t
|d��,}t
|d��}t||�WdQXWdQX|S)z�Copy data from src to dst.

    If follow_symlinks is not set and src is a symbolic link, a new
    symlink will be created instead of copying the file it points to.

    z{!r} and {!r} are the same filez`%s` is a named pipe�rb�wbN)r3r�formatr-�statr/�S_ISFIFO�st_moderr.�islink�symlink�readlink�openr)r1r2r4�fn�str)r*r!r!r"rTs
cCs�|rWtjj|�rWtjj|�rWttd�rPtjtj}}q�dSn)ttd�r|tjtj}}ndS||�}||tj|j	��dS)z�Copy mode bits from src to dst.

    If follow_symlinks is not set, symlinks aren't followed if and only
    if both `src` and `dst` are symlinks.  If `lchmod` isn't available
    (e.g. Linux) this method does nothing.

    �lchmodN�chmod)
r-r.r;r,�lstatrAr8rB�S_IMODEr:)r1r2r4Z	stat_funcZ
chmod_funcr@r!r!r"rqs+�	listxattrcCs�ytj|d|�}WnJtk
re}z*|jtjtjfkrO�ndSWYdd}~XnXx�|D]�}y5tj||d|�}tj|||d|�Wqmtk
r�}z,|jtjtjtjfkr��nWYdd}~XqmXqmWdS)z�Copy extended filesystem attributes from `src` to `dst`.

        Overwrite existing attributes.

        If `follow_symlinks` is false, symlinks won't be followed.

        r4N)	r-rEr/�errno�ENOTSUPZENODATA�getxattr�setxattrZEPERM)r1r2r4�names�e�name�valuer!r!r"�
_copyxattr�s	
!rNcOsdS)Nr!)�args�kwargsr!r!r"rN�sc	s�dddddd��|p@tjj|�o?tjj|�}|r^�fdd�}n�fdd�}|d	�|d|�}tj|j�}|d
�|d|j|jfd|�y|d�||d|�Wntk
r�YnXt	|d�r�y |d
�||j
d|�Wq�tk
r�}zDx<dD]1}t	t|�r?|jt
t|�kr?Pq?q?W�WYdd}~Xq�Xnt||d|�dS)z�Copy all stat info (mode bits, atime, mtime, flags) from src to dst.

    If the optional flag `follow_symlinks` is not set, symlinks aren't followed if and
    only if both `src` and `dst` are symlinks.

    �nsNr4cWsdS)Nr!)rQr4rOr!r!r"�_nop�szcopystat.<locals>._nopcstt|��S)N)�getattrr-)rL)rRr!r"�lookup�szcopystat.<locals>.lookupcs)tt|��}|tjkr%|S�S)N)rSr-�supports_follow_symlinks)rLr?)rRr!r"rT�sr8�utimerB�st_flagsZchflags�
EOPNOTSUPPrG)rXzENOTSUP)r-r.r;r8rDr:�st_atime_ns�st_mtime_ns�NotImplementedErrorr,rWr/rFrSrN)	r1r2r4ZfollowrTr@�mode�why�errr!)rRr"r�s,+!
 
'cCs`tjj|�r6tjj|tjj|��}nt||d|�t||d|�|S)a3Copy data and mode bits ("cp src dst"). Return the file's destination.

    The destination may be a directory.

    If follow_symlinks is false, symlinks won't be followed. This
    resembles GNU's "cp -P src dst".

    If source and destination are the same file, a SameFileError will be
    raised.

    r4)r-r.�isdir�join�basenamerr)r1r2r4r!r!r"r	�s
$cCs`tjj|�r6tjj|tjj|��}nt||d|�t||d|�|S)z�Copy data and all stat info ("cp -p src dst"). Return the file's
    destination."

    The destination may be a directory.

    If follow_symlinks is false, symlinks won't be followed. This
    resembles GNU's "cp -P src dst".

    r4)r-r.r_r`rarr)r1r2r4r!r!r"r
�s

$cs�fdd�}|S)z�Function that can be used as copytree() ignore parameter.

    Patterns is a sequence of glob-style patterns
    that are used to exclude filescs:g}x'�D]}|jtj||��q
Wt|�S)N)�extend�fnmatch�filter�set)r.rJ�
ignored_names�pattern)�patternsr!r"�_ignore_patterns�s
z)ignore_patterns.<locals>._ignore_patternsr!)rhrir!)rhr"r�scCstj|�}|dk	r-|||�}n	t�}tj|�g}x�|D]�}	|	|krhqPntjj||	�}
tjj||	�}y�tjj|
�r=tj|
�}|r�tj||�t	|
|d|�qutjj
|�r|rwPntjj|
�r-t|
||||�qu||
|�n8tjj|
�rht|
||||�n
||
|�WqPt
k
r�}
z|j|
jd�WYdd}
~
XqPtk
r�}z!|j|
|t|�f�WYdd}~XqPXqPWyt	||�Wn\tk
re}z<t|dd�dkrS|j||t|�f�nWYdd}~XnX|r{t
|��n|S)a�Recursively copy a directory tree.

    The destination directory must not already exist.
    If exception(s) occur, an Error is raised with a list of reasons.

    If the optional symlinks flag is true, symbolic links in the
    source tree result in symbolic links in the destination tree; if
    it is false, the contents of the files pointed to by symbolic
    links are copied. If the file pointed by the symlink doesn't
    exist, an exception will be added in the list of errors raised in
    an Error exception at the end of the copy process.

    You can set the optional ignore_dangling_symlinks flag to true if you
    want to silence this exception. Notice that this has no effect on
    platforms that don't support os.symlink.

    The optional ignore argument is a callable. If given, it
    is called with the `src` parameter, which is the directory
    being visited by copytree(), and `names` which is the list of
    `src` contents, as returned by os.listdir():

        callable(src, names) -> ignored_names

    Since copytree() is called recursively, the callable will be
    called once for each directory that is copied. It returns a
    list of names relative to the `src` directory that should
    not be copied.

    The optional copy_function argument is a callable that will be used
    to copy each file. It will be called with the source path and the
    destination path as arguments. By default, copy2() is used, but any
    function that supports the same signature (like copy()) can be used.

    Nr4rZwinerror)r-�listdirre�makedirsr.r`r;r=r<r�existsr_rrrbrOr/�append�strrS)r1r2�symlinks�ignoreZ
copy_functionZignore_dangling_symlinksrJrf�errorsrLZsrcnameZdstname�linktor^r]r!r!r"rsL$	


&32c$Cs�y%tjj|�r$td��nWn2tk
rY|tjj|tj��dSYnXg}ytj|�}Wn+tk
r�|tj|tj��YnXx�|D]�}tjj||�}ytj|�j	}Wntk
r�d}YnXt
j|�rt||�q�ytj
|�Wq�tk
rQ|tj
|tj��Yq�Xq�Wytj|�Wn+tk
r�|tj|tj��YnXdS)Nz%Cannot call rmtree on a symbolic linkr)r-r.r;r/�sys�exc_inforjr`rCr:r8�S_ISDIR�_rmtree_unsafe�unlink�rmdir)r.�onerrorrJrL�fullnamer\r!r!r"rv_s6
	



"
rvc
0Cs@g}ytj|�}WnGtk
rb}z'||_|tj|tj��WYdd}~XnXx�|D]�}tjj||�}y(tj|d|dd�}|j	}Wntk
r�d}YnXtj
|�r�ytj|tjd|�}	Wn+tk
r#|tj|tj��Yq8Xz�tjj
|tj|	��r�t|	||�ytj|d|�Wq�tk
r�|tj|tj��Yq�XnAytd��Wn.tk
r�|tjj|tj��YnXWdtj|	�Xqjytj|d|�Wqjtk
r7|tj|tj��YqjXqjWdS)N�dir_fdr4Frz%Cannot call rmtree on a symbolic link)r-rjr/�filenamersrtr.r`r8r:rur>�O_RDONLY�samestat�fstat�_rmtree_safe_fdrxr;�closerw)
�topfdr.ryrJr^rLrz�orig_str\�dirfdr!r!r"r��sD	,




!
%
r�c!Cs�|rdd�}n|dkr0dd�}ntr�t|t�rWtj|�}nytj|�}Wn/tk
r�|tj|tj��dSYnXytj	|tj
�}Wn/tk
r�|tj|tj��dSYnXz�tjj|tj
|��rZt|||�ytj|�Wq�tk
rV|tj|tj��Yq�XnAytd��Wn.tk
r�|tjj|tj��YnXWdtj|�Xn
t||�SdS)a�Recursively delete a directory tree.

    If ignore_errors is set, errors are ignored; otherwise, if onerror
    is set, it is called to handle the error with arguments (func,
    path, exc_info) where func is platform and implementation dependent;
    path is the argument to that function that caused it to fail; and
    exc_info is a tuple returned by sys.exc_info().  If ignore_errors
    is false and onerror is None, an exception is raised.

    cWsdS)Nr!)rOr!r!r"ry�szrmtree.<locals>.onerrorNcWs�dS)Nr!)rOr!r!r"ry�sz%Cannot call rmtree on a symbolic link)�_use_fd_functions�
isinstance�bytesr-�fsdecoderC�	Exceptionrsrtr>r}r.r~rr�rxr/r;r�rv)r.�
ignore_errorsryr��fdr!r!r"r
�s<
	
	
!
%cCs5tjjtjjpd}tjj|j|��S)N�)r-r.�sep�altsepra�rstrip)r.r�r!r!r"�	_basename�sr�cCs`|}tjj|�r~t||�r;tj||�dStjj|t|��}tjj|�r~td|��q~nytj||�Wn�t	k
r[tjj
|�r�tj|�}tj||�tj
|�nttjj|�r=t||�rtd||f��nt||dd�t|�nt||�tj
|�YnX|S)a0Recursively move a file or directory to another location. This is
    similar to the Unix "mv" command. Return the file or directory's
    destination.

    If the destination is a directory or a symlink to a directory, the source
    is moved inside the directory. The destination path must not already
    exist.

    If the destination already exists but is not a directory, it may be
    overwritten depending on os.rename() semantics.

    If the destination is on our current filesystem, then rename() is used.
    Otherwise, src is copied to the destination and then removed. Symlinks are
    recreated under the new name if os.rename() fails because of cross
    filesystem renames.

    A lot more could be done here...  A look at a mv.c shows a lot of
    the issues this implementation glosses over.

    Nz$Destination path '%s' already existsz.Cannot move a directory '%s' into itself '%s'.roT)r-r.r_r3�renamer`r�rlrr/r;r=r<rw�
_destinsrcrr
r
)r1r2Zreal_dstrrr!r!r"r�s.


cCsut|�}t|�}|jtjj�s@|tjj7}n|jtjj�sh|tjj7}n|j|�S)N)r�endswithr-r.r��
startswith)r1r2r!r!r"r�sr�cCs_tdks|dkrdSyt|�}Wntk
rFd}YnX|dk	r[|dSdS)z"Returns a gid, given a group name.N�)r�KeyError)rL�resultr!r!r"�_get_gid(s
r�cCs_tdks|dkrdSyt|�}Wntk
rFd}YnX|dk	r[|dSdS)z"Returns an uid, given a user name.Nr�)rr�)rLr�r!r!r"�_get_uid4s
r��gzipc
s�idd6dd6}idd6}	tr>d|d<d|	d<n|dk	rn||	krntd	j|���n|d
|	j|d�}
tjj|
�}|r�tjj|�r�|dk	r�|jd|�n|s�tj	|�q�n|dk	r|jd�nt
���t�������fd
d�}|s�tj
|
d||�}
z|
j|d|�Wd|
j�Xn|
S)a�Create a (possibly compressed) tar file from all the files under
    'base_dir'.

    'compress' must be "gzip" (the default), "bzip2", or None.

    'owner' and 'group' can be used to define an owner and a group for the
    archive that is being built. If not provided, the current owner and group
    will be used.

    The output tar file will be named 'base_name' +  ".tar", possibly plus
    the appropriate compression extension (".gz", or ".bz2").

    Returns the output filename.
    Zgzr�r�Nz.gz�bz2�bzip2z.bz2zCbad value for 'compress', or compression format not supported : {0}z.tarzcreating %szCreating tar archivecsF�dk	r!�|_�|_n�dk	rB�|_�|_n|S)N)�gidZgname�uid�uname)Ztarinfo)r��group�ownerr�r!r"�_set_uid_gidls		z#_make_tarball.<locals>._set_uid_gidzw|%srd)�_BZ2_SUPPORTED�
ValueErrorr7�getr-r.�dirnamerl�inforkr�r��tarfiler>�addr�)�	base_name�base_dir�compress�verbose�dry_runr�r��loggerZtar_compressionZcompress_extZarchive_name�archive_dirr��tarr!)r�r�r�r�r"�
_make_tarball@s4


		r�cCs~|rd}nd}ddlm}ddlm}y |d|||gd|�Wn"|k
rytd�|�YnXdS)	Nz-rz-rqr)�DistutilsExecError)�spawn�zipr�zkunable to create zip file '%s': could neither import the 'zipfile' module nor find a standalone zip utility)Zdistutils.errorsr�Zdistutils.spawnr�r)r��zip_filenamer�r�Z
zipoptionsr�r�r!r!r"�_call_external_zip~s	 
	r�cCsN|d}tjj|�}|rmtjj|�rm|dk	rT|jd|�n|smtj|�qmnyddl}Wntk
r�d}YnX|dkr�t||||�n�|dk	r�|jd||�n|sJ|j	|dd|j
��H}tjj|�}	|j|	|	�|dk	rA|jd|	�nx�tj
|�D]�\}
}}xdt|�D]V}
tjjtjj|
|
��}	|j|	|	�|dk	rm|jd|	�qmqmWxs|D]k}
tjjtjj|
|
��}	tjj|	�r�|j|	|	�|dk	r9|jd|	�q9q�q�WqQWWdQXn|S)	amCreate a zip file from all the files under 'base_dir'.

    The output zip file will be named 'base_name' + ".zip".  Uses either the
    "zipfile" Python module (if available) or the InfoZIP "zip" utility
    (if installed and found on the default search path).  If neither tool is
    available, raises ExecError.  Returns the name of the output zip
    file.
    z.zipNzcreating %srz#creating '%s' and adding '%s' to it�wZcompressionzadding '%s')r-r.r�rlr�rk�zipfile�ImportErrorr��ZipFileZZIP_DEFLATED�normpathr(�walk�sortedr`�isfile)r�r�r�r�r�r�r�r�Zzfr.�dirpathZdirnames�	filenamesrLr!r!r"�
_make_zipfile�sH	

	
!
!'r�r�zgzip'ed tar-fileZgztarzuncompressed tar filer�zZIP filer�r�zbzip2'ed tar-fileZbztarcCs'dd�tj�D�}|j�|S)z�Returns a list of supported formats for archiving and unarchiving.

    Each element of the returned sequence is a tuple (name, description)
    cSs&g|]\}}||df�qS)r�r!)�.0rL�registryr!r!r"�
<listcomp>�s	z'get_archive_formats.<locals>.<listcomp>)�_ARCHIVE_FORMATS�items�sort)�formatsr!r!r"r�s	
r�cCs�|dkrg}nt|�s4td|��nt|ttf�sXtd��nxE|D]=}t|ttf�s�t|�dkr_td��q_q_W|||ft|<dS)auRegisters an archive format.

    name is the name of the format. function is the callable that will be
    used to create archives. If provided, extra_args is a sequence of
    (name, value) tuples that will be passed as arguments to the callable.
    description can be provided to describe the format, and will be returned
    by the get_archive_formats() function.
    NzThe %s object is not callablez!extra_args needs to be a sequencer�z+extra_args elements are : (arg_name, value))�callable�	TypeErrorr��tuple�list�lenr�)rL�function�
extra_args�description�elementr!r!r"r�s		
(cCst|=dS)N)r�)rLr!r!r"r�sc	Csltj�}	|dk	rb|dk	r7|jd|�ntjj|�}|sbtj|�qbn|dkrztj}ni|d6|d6}
yt|}Wn"tk
r�t	d|��YnX|d}x"|dD]\}
}||
|
<q�W|dkr||
d	<||
d
<nz||||
�}Wd|dk	rg|dk	rW|jd|	�ntj|	�nX|S)a�Create an archive file (eg. zip or tar).

    'base_name' is the name of the file to create, minus any format-specific
    extension; 'format' is the archive format: one of "zip", "tar", "bztar"
    or "gztar".

    'root_dir' is a directory that will be the root directory of the
    archive; ie. we typically chdir into 'root_dir' before creating the
    archive.  'base_dir' is the directory where we start archiving from;
    ie. 'base_dir' will be the common prefix of all files and
    directories in the archive.  'root_dir' and 'base_dir' both default
    to the current directory.  Returns the name of the archive file.

    'owner' and 'group' are used when creating a tar archive. By default,
    uses the current owner and group.
    Nzchanging into '%s'r�r�zunknown archive format '%s'r�r�r�r�zchanging back to '%s')
r-�getcwd�debugr.r�chdir�curdirr�r�r�)r�r7Zroot_dirr�r�r�r�r�r�Zsave_cwdrP�format_info�func�arg�valr|r!r!r"r�s6



cCs'dd�tj�D�}|j�|S)z�Returns a list of supported formats for unpacking.

    Each element of the returned sequence is a tuple
    (name, extensions, description)
    cSs-g|]#\}}||d|df�qS)r�r!)r�rLr�r!r!r"r�.s	z&get_unpack_formats.<locals>.<listcomp>)�_UNPACK_FORMATSr�r�)r�r!r!r"r(s	
c	Cs�i}x9tj�D]+\}}x|dD]}|||<q*WqWx=|D]5}||krId}t||||f��qIqIWt|�s�td��ndS)z+Checks what gets registered as an unpacker.rz!%s is already registered for "%s"z*The registered function must be a callableN)r�r�r%r�r�)	�
extensionsr�r�Zexisting_extensionsrLr��ext�	extension�msgr!r!r"�_check_unpack_options3s
	r�cCs?|dkrg}nt|||�||||ft|<dS)aMRegisters an unpack format.

    `name` is the name of the format. `extensions` is a list of extensions
    corresponding to the format.

    `function` is the callable that will be
    used to unpack archives. The callable will receive archives to unpack.
    If it's unable to handle an archive, it needs to raise a ReadError
    exception.

    If provided, `extra_args` is a sequence of
    (name, value) tuples that will be passed as arguments to the callable.
    description can be provided to describe the format, and will be returned
    by the get_unpack_formats() function.
    N)r�r�)rLr�r�r�r�r!r!r"rEs	cCst|=dS)z+Removes the pack format from the registery.N)r�)rLr!r!r"r[scCs8tjj|�}tjj|�s4tj|�ndS)z1Ensure that the parent directory of `path` existsN)r-r.r�r_rk)r.r�r!r!r"�_ensure_directory_sr�c	CsByddl}Wntk
r0td��YnX|j|�sStd|��n|j|�}z�x�|j�D]�}|j}|jd�srd|kr�qrntj	j
||jd��}|s�qrnt|�|j
d�sr|j|j�}t|d�}z|j|�Wd|j�~XqrqrWWd|j�XdS)z+Unpack zip `filename` to `extract_dir`
    rNz/zlib not supported, cannot unpack this archive.z%s is not a zip file�/z..r6)r�r�r$Z
is_zipfiler�Zinfolistr|r�r-r.r`�splitr�r�r'r>r(r�)	r|�extract_dirr�r�r�rL�target�data�fr!r!r"�_unpack_zipfilees0
	

r�cCs^ytj|�}Wn%tjk
r:td|��YnXz|j|�Wd|j�XdS)z:Unpack tar/tar.gz/tar.bz2 `filename` to `extract_dir`
    z/%s is not a compressed or uncompressed tar fileN)r�r>ZTarErrorr$Z
extractallr�)r|r�Ztarobjr!r!r"�_unpack_tarfile�sr�z.tar.gzz.tgzz.tarz.zipz.bz2cCsIxBtj�D]4\}}x%|dD]}|j|�r$|Sq$Wq
WdS)Nr)r�r�r�)r|rLr�r�r!r!r"�_find_unpack_format�s
r�cCs�|dkrtj�}n|dk	r�yt|}Wn'tk
r^tdj|���YnX|d}|||t|d��nbt|�}|dkr�tdj|���nt|d}tt|d�}||||�dS)a�Unpack an archive.

    `filename` is the name of the archive.

    `extract_dir` is the name of the target directory, where the archive
    is unpacked. If not provided, the current working directory is used.

    `format` is the archive format: one of "zip", "tar", or "gztar". Or any
    other registered format. If not provided, unpack_archive will use the
    filename extension and see if an unpacker was registered for that
    extension.

    In case none is found, a ValueError is raised.
    NzUnknown unpack format '{0}'r�r�zUnknown archive format '{0}')	r-r�r�r�r�r7�dictr�r$)r|r�r7r�r�rPr!r!r"r�s

�statvfs�
disk_usageZusageztotal used freecCsVtj|�}|j|j}|j|j}|j|j|j}t|||�S)z�Return disk usage statistics about the given path.

        Returned value is a named tuple with attributes 'total', 'used' and
        'free', which are the amount of total, used and free space, in bytes.
        )r-r��f_bavail�f_frsize�f_blocks�f_bfree�_ntuple_diskusage)r.r@�free�total�usedr!r!r"r��s
�ntcCs/tj|�\}}||}t|||�S)z�Return disk usage statistics about the given path.

        Returned values is a named tuple with attributes 'total', 'used' and
        'free', which are the amount of total, used and free space, in bytes.
        )r�Z
_getdiskusager�)r.r�r�r�r!r!r"r��s
cCs�|dkr'|dkr'td��n|}|}|dkrHd}nBt|t�r�t|�}|dkr�tdj|���q�n|dkr�d}nBt|t�s�t|�}|dkr�tdj|���q�ntj	|||�dS)z�Change owner user and group of the given path.

    user and group can be the uid/gid or the user/group names, and in that case,
    they are converted to their respective uid/gid.
    Nzuser and/or group must be setr�zno such user: {!r}zno such group: {!r}���r�)
r�r�rnr��LookupErrorr7�intr�r-r)r.�userr�Z_userZ_groupr!r!r"r�s"		�P�cCsyttjd�}Wnttfk
r7d}YnXyttjd�}Wnttfk
rod}YnX|dks�|dkrytjtjj��}Wn't	t
fk
r�tj|�}YnX|dkr�|j}n|dkr|j
}qntj||f�S)aGet the size of the terminal window.

    For each of the two dimensions, the environment variable, COLUMNS
    and LINES respectively, is checked. If the variable is defined and
    the value is a positive integer, it is used.

    When COLUMNS or LINES is not defined, which is the common case,
    the terminal connected to sys.__stdout__ is queried
    by invoking os.get_terminal_size.

    If the terminal size cannot be successfully queried, either because
    the system doesn't support querying, or because we are not
    connected to a terminal, the value given in fallback parameter
    is used. Fallback defaults to (80, 24) which is the default
    size used by many terminal emulators.

    The value returned is a named tuple of type os.terminal_size.
    ZCOLUMNSrZLINES)r�r-�environr�r�rrs�
__stdout__�fileno�	NameErrorr/�
terminal_size�columns�lines)Zfallbackrr�sizer!r!r"rs$cs�dd�}tjj��r5|�|�r1�SdS|dkr\tjjdtj�}n|sfdS|jtj�}tj	dkrtj
|kr�|jdtj
�ntjjdd�jtj�}t�fd	d
�|D��r��g}q�fdd�|D�}n	�g}t
�}xu|D]m}tjj|�}||kr-|j|�x9|D].}	tjj||	�}
||
|�re|
SqeWq-q-WdS)
a3Given 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)r-r.rl�accessr_)r?r\r!r!r"�
_access_checkFs$zwhich.<locals>._access_checkN�PATH�win32rZPATHEXTr�c3s*|] }�j�j|j��VqdS)N)�lowerr�)r�r�)�cmdr!r"�	<genexpr>cszwhich.<locals>.<genexpr>csg|]}�|�qSr!r!)r�r�)rr!r"r�fs	zwhich.<locals>.<listcomp>)r-r.r�r�r��defpathr��pathseprs�platformr��insert�anyrer0r�r`)rr\r.rZpathext�files�seen�dirZnormdirZthefilerLr!)rr"r9s8
!		


i@)�compresszgzip)rN)rzbzip2)r�r�)Sr#r-rsr8Zos.pathrrc�collectionsrFr�r�r�r��pwdrZgrpr�__all__r/rrrrr$r�r%rr3rrr,rNrr	r
rrrvr�r>rwrx�supports_dir_fdrj�supports_fdrUr�r
Zavoids_symlink_attacksr�rr�r�r�r�r�r�r�rrrrrr�rrr�r�r�r�r�rrm�
namedtupler�r�rLr�rr�F_OK�X_OKrr!r!r!r"�<module>s�



		6	Y!,5	1		=6	
	6%
%

+

Filemanager

Name Type Size Permission Actions
__future__.cpython-34.pyc File 4.07 KB 0644
__future__.cpython-34.pyo File 4.07 KB 0644
__phello__.foo.cpython-34.pyc File 134 B 0644
__phello__.foo.cpython-34.pyo File 134 B 0644
_bootlocale.cpython-34.pyc File 1.02 KB 0644
_bootlocale.cpython-34.pyo File 1016 B 0644
_collections_abc.cpython-34.pyc File 23.39 KB 0644
_collections_abc.cpython-34.pyo File 23.39 KB 0644
_compat_pickle.cpython-34.pyc File 7.33 KB 0644
_compat_pickle.cpython-34.pyo File 7.25 KB 0644
_dummy_thread.cpython-34.pyc File 4.71 KB 0644
_dummy_thread.cpython-34.pyo File 4.71 KB 0644
_markupbase.cpython-34.pyc File 8.72 KB 0644
_markupbase.cpython-34.pyo File 8.54 KB 0644
_osx_support.cpython-34.pyc File 10.38 KB 0644
_osx_support.cpython-34.pyo File 10.38 KB 0644
_pyio.cpython-34.pyc File 63.41 KB 0644
_pyio.cpython-34.pyo File 63.39 KB 0644
_sitebuiltins.cpython-34.pyc File 3.59 KB 0644
_sitebuiltins.cpython-34.pyo File 3.59 KB 0644
_strptime.cpython-34.pyc File 15.41 KB 0644
_strptime.cpython-34.pyo File 15.41 KB 0644
_sysconfigdata.cpython-34.pyc File 24.49 KB 0644
_sysconfigdata.cpython-34.pyo File 24.49 KB 0644
_threading_local.cpython-34.pyc File 6.78 KB 0644
_threading_local.cpython-34.pyo File 6.78 KB 0644
_weakrefset.cpython-34.pyc File 8.27 KB 0644
_weakrefset.cpython-34.pyo File 8.27 KB 0644
abc.cpython-34.pyc File 7.69 KB 0644
abc.cpython-34.pyo File 7.64 KB 0644
aifc.cpython-34.pyc File 27.26 KB 0644
aifc.cpython-34.pyo File 27.26 KB 0644
antigravity.cpython-34.pyc File 847 B 0644
antigravity.cpython-34.pyo File 847 B 0644
argparse.cpython-34.pyc File 64.33 KB 0644
argparse.cpython-34.pyo File 64.17 KB 0644
ast.cpython-34.pyc File 12.07 KB 0644
ast.cpython-34.pyo File 12.07 KB 0644
asynchat.cpython-34.pyc File 8.16 KB 0644
asynchat.cpython-34.pyo File 8.16 KB 0644
asyncore.cpython-34.pyc File 17.54 KB 0644
asyncore.cpython-34.pyo File 17.54 KB 0644
base64.cpython-34.pyc File 17.87 KB 0644
base64.cpython-34.pyo File 17.67 KB 0644
bdb.cpython-34.pyc File 18.26 KB 0644
bdb.cpython-34.pyo File 18.26 KB 0644
binhex.cpython-34.pyc File 13.22 KB 0644
binhex.cpython-34.pyo File 13.22 KB 0644
bisect.cpython-34.pyc File 2.79 KB 0644
bisect.cpython-34.pyo File 2.79 KB 0644
bz2.cpython-34.pyc File 14.8 KB 0644
bz2.cpython-34.pyo File 14.8 KB 0644
cProfile.cpython-34.pyc File 4.51 KB 0644
cProfile.cpython-34.pyo File 4.51 KB 0644
calendar.cpython-34.pyc File 26.92 KB 0644
calendar.cpython-34.pyo File 26.92 KB 0644
cgi.cpython-34.pyc File 29.13 KB 0644
cgi.cpython-34.pyo File 29.13 KB 0644
cgitb.cpython-34.pyc File 10.8 KB 0644
cgitb.cpython-34.pyo File 10.8 KB 0644
chunk.cpython-34.pyc File 5.15 KB 0644
chunk.cpython-34.pyo File 5.15 KB 0644
cmd.cpython-34.pyc File 13.14 KB 0644
cmd.cpython-34.pyo File 13.14 KB 0644
code.cpython-34.pyc File 9.47 KB 0644
code.cpython-34.pyo File 9.47 KB 0644
codecs.cpython-34.pyc File 34.31 KB 0644
codecs.cpython-34.pyo File 34.31 KB 0644
codeop.cpython-34.pyc File 6.31 KB 0644
codeop.cpython-34.pyo File 6.31 KB 0644
colorsys.cpython-34.pyc File 3.57 KB 0644
colorsys.cpython-34.pyo File 3.57 KB 0644
compileall.cpython-34.pyc File 7.21 KB 0644
compileall.cpython-34.pyo File 7.21 KB 0644
configparser.cpython-34.pyc File 43.83 KB 0644
configparser.cpython-34.pyo File 43.83 KB 0644
contextlib.cpython-34.pyc File 10.13 KB 0644
contextlib.cpython-34.pyo File 10.13 KB 0644
copy.cpython-34.pyc File 7.87 KB 0644
copy.cpython-34.pyo File 7.79 KB 0644
copyreg.cpython-34.pyc File 4.5 KB 0644
copyreg.cpython-34.pyo File 4.46 KB 0644
crypt.cpython-34.pyc File 2.38 KB 0644
crypt.cpython-34.pyo File 2.38 KB 0644
csv.cpython-34.pyc File 12.69 KB 0644
csv.cpython-34.pyo File 12.69 KB 0644
datetime.cpython-34.pyc File 54.95 KB 0644
datetime.cpython-34.pyo File 53.02 KB 0644
decimal.cpython-34.pyc File 168.48 KB 0644
decimal.cpython-34.pyo File 168.48 KB 0644
difflib.cpython-34.pyc File 59.1 KB 0644
difflib.cpython-34.pyo File 59.05 KB 0644
dis.cpython-34.pyc File 14.25 KB 0644
dis.cpython-34.pyo File 14.25 KB 0644
doctest.cpython-34.pyc File 78.23 KB 0644
doctest.cpython-34.pyo File 77.97 KB 0644
dummy_threading.cpython-34.pyc File 1.19 KB 0644
dummy_threading.cpython-34.pyo File 1.19 KB 0644
enum.cpython-34.pyc File 15.96 KB 0644
enum.cpython-34.pyo File 15.96 KB 0644
filecmp.cpython-34.pyc File 8.91 KB 0644
filecmp.cpython-34.pyo File 8.91 KB 0644
fileinput.cpython-34.pyc File 13.96 KB 0644
fileinput.cpython-34.pyo File 13.96 KB 0644
fnmatch.cpython-34.pyc File 3.07 KB 0644
fnmatch.cpython-34.pyo File 3.07 KB 0644
formatter.cpython-34.pyc File 18.47 KB 0644
formatter.cpython-34.pyo File 18.47 KB 0644
fractions.cpython-34.pyc File 18.82 KB 0644
fractions.cpython-34.pyo File 18.82 KB 0644
ftplib.cpython-34.pyc File 32.54 KB 0644
ftplib.cpython-34.pyo File 32.54 KB 0644
functools.cpython-34.pyc File 23.06 KB 0644
functools.cpython-34.pyo File 23.06 KB 0644
genericpath.cpython-34.pyc File 3.41 KB 0644
genericpath.cpython-34.pyo File 3.41 KB 0644
getopt.cpython-34.pyc File 6.58 KB 0644
getopt.cpython-34.pyo File 6.53 KB 0644
getpass.cpython-34.pyc File 4.52 KB 0644
getpass.cpython-34.pyo File 4.52 KB 0644
gettext.cpython-34.pyc File 14.82 KB 0644
gettext.cpython-34.pyo File 14.82 KB 0644
glob.cpython-34.pyc File 2.81 KB 0644
glob.cpython-34.pyo File 2.81 KB 0644
gzip.cpython-34.pyc File 18.99 KB 0644
gzip.cpython-34.pyo File 18.94 KB 0644
hashlib.cpython-34.pyc File 7.76 KB 0644
hashlib.cpython-34.pyo File 7.76 KB 0644
heapq.cpython-34.pyc File 13.58 KB 0644
heapq.cpython-34.pyo File 13.58 KB 0644
hmac.cpython-34.pyc File 5.03 KB 0644
hmac.cpython-34.pyo File 5.03 KB 0644
imaplib.cpython-34.pyc File 42.46 KB 0644
imaplib.cpython-34.pyo File 40 KB 0644
imghdr.cpython-34.pyc File 4.05 KB 0644
imghdr.cpython-34.pyo File 4.05 KB 0644
imp.cpython-34.pyc File 9.64 KB 0644
imp.cpython-34.pyo File 9.64 KB 0644
inspect.cpython-34.pyc File 74.54 KB 0644
inspect.cpython-34.pyo File 74.22 KB 0644
io.cpython-34.pyc File 3.38 KB 0644
io.cpython-34.pyo File 3.38 KB 0644
ipaddress.cpython-34.pyc File 61.51 KB 0644
ipaddress.cpython-34.pyo File 61.51 KB 0644
keyword.cpython-34.pyc File 1.9 KB 0644
keyword.cpython-34.pyo File 1.9 KB 0644
linecache.cpython-34.pyc File 3.04 KB 0644
linecache.cpython-34.pyo File 3.04 KB 0644
locale.cpython-34.pyc File 36.4 KB 0644
locale.cpython-34.pyo File 36.4 KB 0644
lzma.cpython-34.pyc File 15.54 KB 0644
lzma.cpython-34.pyo File 15.54 KB 0644
macpath.cpython-34.pyc File 5.87 KB 0644
macpath.cpython-34.pyo File 5.87 KB 0644
macurl2path.cpython-34.pyc File 2.05 KB 0644
macurl2path.cpython-34.pyo File 2.05 KB 0644
mailbox.cpython-34.pyc File 68.64 KB 0644
mailbox.cpython-34.pyo File 68.54 KB 0644
mailcap.cpython-34.pyc File 6.39 KB 0644
mailcap.cpython-34.pyo File 6.39 KB 0644
mimetypes.cpython-34.pyc File 16.41 KB 0644
mimetypes.cpython-34.pyo File 16.41 KB 0644
modulefinder.cpython-34.pyc File 16.97 KB 0644
modulefinder.cpython-34.pyo File 16.89 KB 0644
netrc.cpython-34.pyc File 4.18 KB 0644
netrc.cpython-34.pyo File 4.18 KB 0644
nntplib.cpython-34.pyc File 35.46 KB 0644
nntplib.cpython-34.pyo File 35.46 KB 0644
ntpath.cpython-34.pyc File 12.99 KB 0644
ntpath.cpython-34.pyo File 12.99 KB 0644
nturl2path.cpython-34.pyc File 1.68 KB 0644
nturl2path.cpython-34.pyo File 1.68 KB 0644
numbers.cpython-34.pyc File 12.37 KB 0644
numbers.cpython-34.pyo File 12.37 KB 0644
opcode.cpython-34.pyc File 5.05 KB 0644
opcode.cpython-34.pyo File 5.05 KB 0644
operator.cpython-34.pyc File 12.48 KB 0644
operator.cpython-34.pyo File 12.48 KB 0644
optparse.cpython-34.pyc File 50.33 KB 0644
optparse.cpython-34.pyo File 50.25 KB 0644
os.cpython-34.pyc File 28.91 KB 0644
os.cpython-34.pyo File 28.91 KB 0644
pathlib.cpython-34.pyc File 39.53 KB 0644
pathlib.cpython-34.pyo File 39.53 KB 0644
pdb.cpython-34.pyc File 48.31 KB 0644
pdb.cpython-34.pyo File 48.25 KB 0644
pickle.cpython-34.pyc File 45.88 KB 0644
pickle.cpython-34.pyo File 45.74 KB 0644
pickletools.cpython-34.pyc File 68.61 KB 0644
pickletools.cpython-34.pyo File 67.55 KB 0644
pipes.cpython-34.pyc File 8.23 KB 0644
pipes.cpython-34.pyo File 8.23 KB 0644
pkgutil.cpython-34.pyc File 17.19 KB 0644
pkgutil.cpython-34.pyo File 17.19 KB 0644
platform.cpython-34.pyc File 30.44 KB 0644
platform.cpython-34.pyo File 30.44 KB 0644
plistlib.cpython-34.pyc File 29.44 KB 0644
plistlib.cpython-34.pyo File 29.36 KB 0644
poplib.cpython-34.pyc File 13.43 KB 0644
poplib.cpython-34.pyo File 13.43 KB 0644
posixpath.cpython-34.pyc File 9.58 KB 0644
posixpath.cpython-34.pyo File 9.58 KB 0644
pprint.cpython-34.pyc File 11.19 KB 0644
pprint.cpython-34.pyo File 11.03 KB 0644
profile.cpython-34.pyc File 14.8 KB 0644
profile.cpython-34.pyo File 14.55 KB 0644
pstats.cpython-34.pyc File 23.12 KB 0644
pstats.cpython-34.pyo File 23.12 KB 0644
pty.cpython-34.pyc File 4.13 KB 0644
pty.cpython-34.pyo File 4.13 KB 0644
py_compile.cpython-34.pyc File 6.7 KB 0644
py_compile.cpython-34.pyo File 6.7 KB 0644
pyclbr.cpython-34.pyc File 8.98 KB 0644
pyclbr.cpython-34.pyo File 8.98 KB 0644
pydoc.cpython-34.pyc File 88.78 KB 0644
pydoc.cpython-34.pyo File 88.72 KB 0644
queue.cpython-34.pyc File 9.04 KB 0644
queue.cpython-34.pyo File 9.04 KB 0644
quopri.cpython-34.pyc File 6.29 KB 0644
quopri.cpython-34.pyo File 6.09 KB 0644
random.cpython-34.pyc File 18.61 KB 0644
random.cpython-34.pyo File 18.61 KB 0644
re.cpython-34.pyc File 14.21 KB 0644
re.cpython-34.pyo File 14.21 KB 0644
reprlib.cpython-34.pyc File 5.73 KB 0644
reprlib.cpython-34.pyo File 5.73 KB 0644
rlcompleter.cpython-34.pyc File 5.56 KB 0644
rlcompleter.cpython-34.pyo File 5.56 KB 0644
runpy.cpython-34.pyc File 7.57 KB 0644
runpy.cpython-34.pyo File 7.57 KB 0644
sched.cpython-34.pyc File 6.42 KB 0644
sched.cpython-34.pyo File 6.42 KB 0644
selectors.cpython-34.pyc File 16.35 KB 0644
selectors.cpython-34.pyo File 16.35 KB 0644
shelve.cpython-34.pyc File 9.72 KB 0644
shelve.cpython-34.pyo File 9.72 KB 0644
shlex.cpython-34.pyc File 7.34 KB 0644
shlex.cpython-34.pyo File 7.34 KB 0644
shutil.cpython-34.pyc File 32.24 KB 0644
shutil.cpython-34.pyo File 32.24 KB 0644
site.cpython-34.pyc File 17.55 KB 0644
site.cpython-34.pyo File 17.55 KB 0644
smtpd.cpython-34.pyc File 25.07 KB 0644
smtpd.cpython-34.pyo File 25.07 KB 0644
smtplib.cpython-34.pyc File 32.35 KB 0644
smtplib.cpython-34.pyo File 32.28 KB 0644
sndhdr.cpython-34.pyc File 6.61 KB 0644
sndhdr.cpython-34.pyo File 6.61 KB 0644
socket.cpython-34.pyc File 17.69 KB 0644
socket.cpython-34.pyo File 17.64 KB 0644
socketserver.cpython-34.pyc File 22.71 KB 0644
socketserver.cpython-34.pyo File 22.71 KB 0644
sre_compile.cpython-34.pyc File 11.66 KB 0644
sre_compile.cpython-34.pyo File 11.5 KB 0644
sre_constants.cpython-34.pyc File 5.45 KB 0644
sre_constants.cpython-34.pyo File 5.45 KB 0644
sre_parse.cpython-34.pyc File 19.76 KB 0644
sre_parse.cpython-34.pyo File 19.76 KB 0644
ssl.cpython-34.pyc File 26.96 KB 0644
ssl.cpython-34.pyo File 26.96 KB 0644
stat.cpython-34.pyc File 3.49 KB 0644
stat.cpython-34.pyo File 3.49 KB 0644
statistics.cpython-34.pyc File 16.76 KB 0644
statistics.cpython-34.pyo File 16.46 KB 0644
string.cpython-34.pyc File 8.18 KB 0644
string.cpython-34.pyo File 8.18 KB 0644
stringprep.cpython-34.pyc File 13.32 KB 0644
stringprep.cpython-34.pyo File 13.25 KB 0644
struct.cpython-34.pyc File 347 B 0644
struct.cpython-34.pyo File 347 B 0644
subprocess.cpython-34.pyc File 42.34 KB 0644
subprocess.cpython-34.pyo File 42.23 KB 0644
sunau.cpython-34.pyc File 17.88 KB 0644
sunau.cpython-34.pyo File 17.88 KB 0644
symbol.cpython-34.pyc File 2.6 KB 0644
symbol.cpython-34.pyo File 2.6 KB 0644
symtable.cpython-34.pyc File 11.04 KB 0644
symtable.cpython-34.pyo File 10.92 KB 0644
sysconfig.cpython-34.pyc File 16.88 KB 0644
sysconfig.cpython-34.pyo File 16.88 KB 0644
tabnanny.cpython-34.pyc File 7.57 KB 0644
tabnanny.cpython-34.pyo File 7.57 KB 0644
tarfile.cpython-34.pyc File 66.45 KB 0644
tarfile.cpython-34.pyo File 66.45 KB 0644
telnetlib.cpython-34.pyc File 18.94 KB 0644
telnetlib.cpython-34.pyo File 18.94 KB 0644
tempfile.cpython-34.pyc File 21.07 KB 0644
tempfile.cpython-34.pyo File 21.07 KB 0644
textwrap.cpython-34.pyc File 13.48 KB 0644
textwrap.cpython-34.pyo File 13.39 KB 0644
this.cpython-34.pyc File 1.29 KB 0644
this.cpython-34.pyo File 1.29 KB 0644
threading.cpython-34.pyc File 38.05 KB 0644
threading.cpython-34.pyo File 37.36 KB 0644
timeit.cpython-34.pyc File 10.8 KB 0644
timeit.cpython-34.pyo File 10.8 KB 0644
token.cpython-34.pyc File 3.53 KB 0644
token.cpython-34.pyo File 3.53 KB 0644
tokenize.cpython-34.pyc File 19.48 KB 0644
tokenize.cpython-34.pyo File 19.43 KB 0644
trace.cpython-34.pyc File 23.62 KB 0644
trace.cpython-34.pyo File 23.56 KB 0644
traceback.cpython-34.pyc File 10.83 KB 0644
traceback.cpython-34.pyo File 10.83 KB 0644
tracemalloc.cpython-34.pyc File 16.73 KB 0644
tracemalloc.cpython-34.pyo File 16.73 KB 0644
tty.cpython-34.pyc File 1.12 KB 0644
tty.cpython-34.pyo File 1.12 KB 0644
types.cpython-34.pyc File 5.43 KB 0644
types.cpython-34.pyo File 5.43 KB 0644
uu.cpython-34.pyc File 3.93 KB 0644
uu.cpython-34.pyo File 3.93 KB 0644
uuid.cpython-34.pyc File 21.35 KB 0644
uuid.cpython-34.pyo File 21.29 KB 0644
warnings.cpython-34.pyc File 11.98 KB 0644
warnings.cpython-34.pyo File 11.27 KB 0644
wave.cpython-34.pyc File 18.69 KB 0644
wave.cpython-34.pyo File 18.63 KB 0644
weakref.cpython-34.pyc File 19.87 KB 0644
weakref.cpython-34.pyo File 19.83 KB 0644
webbrowser.cpython-34.pyc File 16.73 KB 0644
webbrowser.cpython-34.pyo File 16.69 KB 0644
xdrlib.cpython-34.pyc File 8.79 KB 0644
xdrlib.cpython-34.pyo File 8.79 KB 0644
zipfile.cpython-34.pyc File 44.75 KB 0644
zipfile.cpython-34.pyo File 44.7 KB 0644