AlkantarClanX12

Your IP : 3.141.2.191


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

o

6��f���@shdZddlZddlZddlZddlmZeee	�Z
ejZgd�Z
dd�Zdd�Zd	evrod	Zd
ZddlTz
ddlmZe
�d
�Wn	eyKYnwddlZzddlmZWn	eyaYnwddlZe
�ee��[nIdevr�dZdZddlTz
ddlmZe
�d
�Wn	ey�YnwddlZddlZe
�ee��[zddlmZWn
ey�Ynwed��eejd<ddlmZmZm Z m!Z!m"Z"m#Z#m$Z$m%Z%[ed��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/d0�e(d1d2�e(d1d3�e(d4d �e*Z+e)�Z*e(dd�e*Z,e)�Z*e(d5d6�e(d7d�e(d8d�e(d9d:�e(d9d;�e(d<d=�e*�-e�e(d>d?�e(d@d �e(dAd �e(dBdC�edD��r�edE��r�e(dFdD�e*Z.e)�Z*e(dd�e(dd�e(dd�e(dGdH�e(dId�edJ��r�e(dKd�e(d!d"�e(dLd �e(dMd�e(dd�e(d4d �e(dNd�e*Z/[*[['[(dZ0dOZ1dPZ2d�dSdT�Z3dUdV�Z4dWdX�Z5e
�gdY��d�d[d\�Z6d]d^�Z7e
�d\�e8ehe+k�re9ehe.k�rd�dRdd`�dadb�Z:dcdd�Z;e
�db�dedf�Z<dgdh�Z=didj�Z>dkdl�Z?dmdn�Z@dodp�ZAe
�gdq��d�drds�ZBd�dtdu�ZCddvlmDZDmEZEGdwdx�dxeD�ZFdydz�ZGeG�ZH[Gd�d{d|�ZIedkZJe
�d}�eJ�r�d~d�ZKeFeHjLeKeMeKeM�ZN[Kd�d�d��ZOe
�d��d�d��ZPeP�\ZQZR[Ped���r�ed���s�ed���r�dZSdOZTZUe
�gd���d�d��ZVd�d��ZWd�d��ZXd�d��ZYd�d��ZZe
�gd���ed���r�d�d��Z[d�d��Z\e
�d�d�g�ed���r�d�d��Z]d�d��Z^e
�d�d�g�ej_d�k�rd�d�d��Z`Gd�d��d��Zae
�d��d�d�d��Zbd�d��Zced���secZdd�ed_eGd�d��d�ejf�Zgedk�r2Gd�d��d��Zhd�d��ZidSdS)�aNOS routines for NT or Posix depending on what system we're on.

This exports:
  - all functions from posix or nt, e.g. unlink, stat, etc.
  - os.path is either posixpath or ntpath
  - os.name is either 'posix' or 'nt'
  - os.curdir is a string representing the current directory (always '.')
  - os.pardir is a string representing the parent directory (always '..')
  - os.sep is the (or a most common) pathname separator ('/' or '\\')
  - os.extsep is the extension separator (always '.')
  - os.altsep is the alternate pathname separator (None or '/')
  - os.pathsep is the component separator used in $PATH etc
  - os.linesep is the line separator in text files ('\r' or '\n' or '\r\n')
  - os.defpath is the default search path for executables
  - os.devnull is the file path of the null device ('/dev/null', etc.)

Programs that import and use 'os' stand a better chance of being
portable between different platforms.  Of course, they must then
only use functions that are defined by all platforms (e.g., unlink
and opendir), and leave all pathname manipulation to os.path
(e.g., split and join).
�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�r7ttd�}||kr=dSzt||�WdSt	yW|rSt�
|�sT�YdSw)a�makedirs(name [, mode=0o777][, exist_ok=False])

    Super-mkdir; create a leaf directory and all intermediate ones.  Works like
    mkdir, except that any intermediate path segment (not just the rightmost)
    will be created if it does not exist. If the target directory already
    exists, raise an OSError if exist_ok is False. Otherwise no exception is
    raised.  This is recursive.

    )�exist_ok�ASCIIN)r�split�exists�makedirs�FileExistsErrorr�
isinstance�bytesr7�OSError�isdir)r
�moderL�head�tail�cdirrrrrP�s*
�

��rPcCsxt|�t�|�\}}|st�|�\}}|r6|r8zt|�Wn
ty(YdSwt�|�\}}|r:|sdSdSdSdS)a�removedirs(name)

    Super-rmdir; remove a leaf directory and all empty intermediate
    ones.  Works like rmdir except that, if the leaf directory is
    successfully removed, directories corresponding to rightmost path
    segments will be pruned away until either the whole path is
    consumed or an error occurs.  Errors during this latter phase are
    ignored -- they generally mean that a directory was not empty.

    N)r?rrNrT)r
rWrXrrr�
removedirs�s��rZcCstt�|�\}}|r|rt�|�st|�t||�t�|�\}}|r6|r8zt|�WdSty5YdSwdSdS)a<renames(old, new)

    Super-rename; create directories as necessary and delete any left
    empty.  Works like rename, except creation of any intermediate
    directories needed to make the new pathname good is attempted
    first.  After the rename, directories corresponding to rightmost
    path segments of the old name will be pruned until either the
    whole path is consumed or a nonempty directory is found.

    Note: this function can fail with the new directory structure made
    if you lack permissions needed to unlink the leaf directory or
    file.

    N)rrNrOrPr<rZrT)�old�newrWrXrrr�renames�s
��r])rPrZr]TcCs$t�d||||�tt|�|||�S)a,Directory tree generator.

    For each directory in the directory tree rooted at top (including top
    itself, but excluding '.' and '..'), yields a 3-tuple

        dirpath, dirnames, filenames

    dirpath is a string, the path to the directory.  dirnames is a list of
    the names of the subdirectories in dirpath (including symlinks to directories,
    and excluding '.' and '..').
    filenames is a list of the names of the non-directory files in dirpath.
    Note that the names in the lists are just names, with no path components.
    To get a full path (which begins with top) to a file or directory in
    dirpath, do os.path.join(dirpath, name).

    If optional arg 'topdown' is true or not specified, the triple for a
    directory is generated before the triples for any of its subdirectories
    (directories are generated top down).  If topdown is false, the triple
    for a directory is generated after the triples for all of its
    subdirectories (directories are generated bottom up).

    When topdown is true, the caller can modify the dirnames list in-place
    (e.g., via del or slice assignment), and walk will only recurse into the
    subdirectories whose names remain in dirnames; this can be used to prune the
    search, or to impose a specific order of visiting.  Modifying dirnames when
    topdown is false has no effect on the behavior of os.walk(), since the
    directories in dirnames have already been generated by the time dirnames
    itself is generated. No matter the value of topdown, the list of
    subdirectories is retrieved before the tuples for the directory and its
    subdirectories are generated.

    By default errors from the os.scandir() call are ignored.  If
    optional arg 'onerror' is specified, it should be a function; it
    will be called with one argument, an OSError instance.  It can
    report the error to continue with the walk, or raise the exception
    to abort the walk.  Note that the filename is available as the
    filename attribute of the exception object.

    By default, os.walk does not follow symbolic links to subdirectories on
    systems that support them.  In order to get this functionality, set the
    optional argument 'followlinks' to true.

    Caution:  if you pass a relative pathname for top, don't change the
    current working directory between resumptions of walk.  walk never
    changes the current directory, and assumes that the client doesn't
    either.

    Example:

    import os
    from os.path import join, getsize
    for root, dirs, files in os.walk('python/Lib/email'):
        print(root, "consumes", end="")
        print(sum(getsize(join(root, name)) for name in files), end="")
        print("bytes in", len(files), "non-directory files")
        if 'CVS' in dirs:
            dirs.remove('CVS')  # don't visit CVS directories

    zos.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�rPt�
|t|��rWt||t|t�|||�EdHWt|�dSWt|�dSWt|�dSt|�w)aDirectory tree generator.

        This behaves exactly like walk(), except that it yields a 4-tuple

            dirpath, dirnames, filenames, dirfd

        `dirpath`, `dirnames` and `filenames` are identical to walk() output,
        and `dirfd` is a file descriptor referring to the directory `dirpath`.

        The advantage of fwalk() over walk() is that it's safe against symlink
        races (when follow_symlinks is False).

        If dir_fd is not None, it should be a file descriptor open to a directory,
          and top should be relative; top will then be relative to that directory.
          (dir_fd is always supported for fwalk.)

        Caution:
        Since fwalk() yields file descriptors, those are only valid until the
        next iteration step, so you should dup() them if you want to keep them
        for a longer period.

        Example:

        import os
        for root, dirs, files, rootfd in os.fwalk('python/Lib/email'):
            print(root, "consumes", end="")
            print(sum(os.stat(name, dir_fd=rootfd).st_size for name in files),
                  end="")
            print("bytes in", len(files), "non-directory files")
            if 'CVS' in dirs:
                dirs.remove('CVS')  # don't visit CVS directories
        zos.fwalk�	__index__Frx�rzN)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||�dS)zpexecl(file, *args)

    Execute the executable file with argument list args, replacing the
    current process. N)�execv��file�argsrrr�execl�r�cG� |d}t||dd�|�dS)z�execle(file, *args, env)

    Execute the executable file with argument list args and
    environment env, replacing the current process. ���N)rC�r�r��envrrr�execle!sr�cGr�)z�execlp(file, *args)

    Execute the executable file (which is searched for along $PATH)
    with argument list args, replacing the current process. N)�execvpr�rrr�execlp)r�r�cGr�)z�execlpe(file, *args, env)

    Execute the executable file (which is searched for along $PATH)
    with argument list args and environment env, replacing the current
    process. r�N)�execvper�rrr�execlpe0sr�cCr�)z�execvp(file, args)

    Execute the executable file (which is searched for along $PATH)
    with argument list args, replacing the current process.
    args may be a list or tuple of strings. N��_execvper�rrrr�9sr�cCst|||�dS)z�execvpe(file, args, env)

    Execute the executable file (which is searched for along $PATH)
    with argument list args and environment env, replacing the
    current process.
    args may be a list or tuple of strings. Nr�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}|dur
t}|���L|�dt�z|�d�}Wnty'd}YnwtrSz|d}Wnttfy;Ynw|durDt	d��|}|durSt
|t�rSt|�}Wd�n1s]wY|durht
}|�t�S)z�Returns the sequence of directories that will be searched for the
    named executable (similar to a shell) when launching a process.

    *env* must be an environment variable dict or None.  If *env* is None,
    os.environ will be used.
    rN�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_listbrrrrls8

�����
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�||�S)z�Get an environment variable, return None if it doesn't exist.
    The optional second argument can specify an alternate default.
    key, default and the result are str.)r�r��r��defaultrrr�getenv�r�)r�r�cCr�)Nzbytes expected, not %s)rRrSr�r�r�r�rrr�_check_bytesr�r�cCr�)z�Get an environment variable, return None if it doesn't exist.
        The optional second argument can specify an alternate default.
        key, default and the result are bytes.)�environbr�r�rrr�getenvbr�r�)r�r�cs4t���t�����fdd�}��fdd�}||fS)Nc�"t|�}t|t�r|����S|S)aEncode filename (an os.PathLike, bytes, or str) to the filesystem
        encoding with 'surrogateescape' error handler, return bytes unchanged.
        On Windows, use 'strict' error handler if the file system encoding is
        'mbcs' (which is the default encoding).
        )rarRr.r���filename�r��errorsrrr%�
z_fscodec.<locals>.fsencodecr�)aDecode filename (an os.PathLike, bytes, or str) from the filesystem
        encoding with 'surrogateescape' error handler, return str unchanged. On
        Windows, use 'strict' error handler if the file system encoding is
        'mbcs' (which is the default encoding).
        )rarRrSr�r�rrrr1rz_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�S)aspawnv(mode, file, args) -> integer

Execute file with arguments from args in a subprocess.
If mode == P_NOWAIT return the pid of the process.
If mode == P_WAIT return the process's exit code if it exits normally;
otherwise return -SIG, where SIG is the signal that killed it. N)rr��rVr�r�rrrrir�cC�t||||t�S)a:spawnve(mode, file, args, env) -> integer

Execute file with arguments from args in a subprocess with the
specified environment.
If mode == P_NOWAIT return the pid of the process.
If mode == P_WAIT return the process's exit code if it exits normally;
otherwise return -SIG, where SIG is the signal that killed it. )rrC�rVr�r�r�rrr�spawnver�rcCr)a8spawnvp(mode, file, args) -> integer

Execute file (which is looked for along $PATH) with arguments from
args in a subprocess.
If mode == P_NOWAIT return the pid of the process.
If mode == P_WAIT return the process's exit code if it exits normally;
otherwise return -SIG, where SIG is the signal that killed it. N)rr�rrrr�spawnvp~rrcCr)a\spawnvpe(mode, file, args, env) -> integer

Execute file (which is looked for along $PATH) with arguments from
args in a subprocess with the supplied environment.
If mode == P_NOWAIT return the pid of the process.
If mode == P_WAIT return the process's exit code if it exits normally;
otherwise return -SIG, where SIG is the signal that killed it. )rr�rrrr�spawnvpe�rr)rrrrcG�t|||�S)aspawnl(mode, file, *args) -> integer

Execute file with arguments from args in a subprocess.
If mode == P_NOWAIT return the pid of the process.
If mode == P_WAIT return the process's exit code if it exits normally;
otherwise return -SIG, where SIG is the signal that killed it. )rrrrr�spawnl�srcG�|d}t|||dd�|�S)a:spawnle(mode, file, *args, env) -> integer

Execute file with arguments from args in a subprocess with the
supplied environment.
If mode == P_NOWAIT return the pid of the process.
If mode == P_WAIT return the process's exit code if it exits normally;
otherwise return -SIG, where SIG is the signal that killed it. r�N)rrrrr�spawnle��r cGr)aWspawnlp(mode, file, *args) -> integer

Execute file (which is looked for along $PATH) with arguments from
args in a subprocess with the supplied environment.
If mode == P_NOWAIT return the pid of the process.
If mode == P_WAIT return the process's exit code if it exits normally;
otherwise return -SIG, where SIG is the signal that killed it. )rrrrr�spawnlp�sr"cGr)a]spawnlpe(mode, file, *args, env) -> integer

Execute file (which is looked for along $PATH) with arguments from
args in a subprocess with the supplied environment.
If mode == P_NOWAIT return the pid of the process.
If mode == P_WAIT return the process's exit code if it exits normally;
otherwise return -SIG, where SIG is the signal that killed it. r�N)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(
��r4c@s<eZdZdd�Zdd�Zdd�Zdd�Zd	d
�Zdd�Zd
S)r0cCs||_||_dSr)�_stream�_proc)r��streamr3rrrr��s
z_wrap_close.__init__cCs4|j��|j��}|dkrdStdkr|S|d>S)Nrr*�)r5r�r6�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)�getattrr5)r�r
rrr�__getattr__�r�z_wrap_close.__getattr__cCr�r)�iterr5r�rrrr��rz_wrap_close.__iter__N)	r�r�r�r�r�r<rArCr�rrrrr0�s	r0cOsRt|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:)�fdrVr2r�r��kwargsr-rrrrs

rcCs|t|ttf�r	|St|�}z|�|�}Wnty(t|d�r!�td|j��wt|ttf�r2|Std�	|jt|�j���)aaReturn the path representation of a path-like object.

    If str or bytes is passed in, it is returned unchanged. Otherwise the
    os.PathLike interface is used to get the path representation. If the
    path representation is not str or bytes, TypeError is raised. If the
    provided path is not str, bytes, or os.PathLike, TypeError is raised.
    �
__fspath__z/expected str, bytes or os.PathLike object, not z7expected {}.__fspath__() to return str or bytes, not {})
rRr.rSr�rIr!r~r�r�r�)r�	path_type�	path_reprrrr�_fspaths&
����rLrac@s2eZdZdZejdd��Zedd��Zee	�Z
dS)�PathLikezCAbstract base class for implementing the file system path protocol.cCst�)z9Return the file system path representation of the object.)�NotImplementedErrorr�rrrrI3szPathLike.__fspath__cCs|tur	t|d�StS)NrI)rMrr�)�cls�subclassrrr�__subclasshook__8s
zPathLike.__subclasshook__N)r�r�r��__doc__�abc�abstractmethodrI�classmethodrQ�GenericAlias�__class_getitem__rrrrrM/s

rMc@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?r@rrrrALr�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<rAr�rrrrrXBsrXcCs ddl}|�|�}t|||j�S)aOAdd a path to the DLL search path.

        This search path is used when resolving dependencies for imported
        extension modules (the module itself is resolved through sys.path),
        and also by ctypes.

        Remove the directory by calling close() on the returned object or
        using it in a with statement.
        rN)r*Z_add_dll_directoryrXrZ)rr*r[rrr�add_dll_directorySs

�r\)rKF)TNF)rwTNr)r%r�)r%r�N)jrRrSr^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�rrrrr	r
rrrrrrr r"r#�platformr4r0rrLrar��ABCrMrXr\rrrr�<module>sr����
(











































 
?
R1
8		

 -G

�


	

	






�