/snap/core20/2866/usr/lib/python3.8/__pycache__
NameSizeModeActions
abc.cpython-38.pyc53340644editdlrm
aifc.cpython-38.pyc254740644editdlrm
antigravity.cpython-38.pyc7970644editdlrm
argparse.cpython-38.pyc625910644editdlrm
ast.cpython-38.pyc167630644editdlrm
asynchat.cpython-38.pyc68510644editdlrm
asyncore.cpython-38.pyc160280644editdlrm
base64.cpython-38.pyc170710644editdlrm
bdb.cpython-38.pyc249210644editdlrm
binhex.cpython-38.pyc121340644editdlrm
bisect.cpython-38.pyc23540644editdlrm
bz2.cpython-38.pyc114450644editdlrm
calendar.cpython-38.pyc270640644editdlrm
cgi.cpython-38.pyc265440644editdlrm
cgitb.cpython-38.pyc101500644editdlrm
chunk.cpython-38.pyc48390644editdlrm
cmd.cpython-38.pyc126260644editdlrm
code.cpython-38.pyc99130644editdlrm
codecs.cpython-38.pyc339560644editdlrm
codeop.cpython-38.pyc64170644editdlrm
colorsys.cpython-38.pyc32400644editdlrm
compileall.cpython-38.pyc94100644editdlrm
configparser.cpython-38.pyc457180644editdlrm
contextlib.cpython-38.pyc202290644editdlrm
contextvars.cpython-38.pyc2430644editdlrm
copy.cpython-38.pyc69870644editdlrm
copyreg.cpython-38.pyc43180644editdlrm
cProfile.cpython-38.pyc54800644editdlrm
crypt.cpython-38.pyc33870644editdlrm
csv.cpython-38.pyc119100644editdlrm
dataclasses.cpython-38.pyc236530644editdlrm
datetime.cpython-38.pyc571730644editdlrm
decimal.cpython-38.pyc3590644editdlrm
difflib.cpython-38.pyc594380644editdlrm
dis.cpython-38.pyc158080644editdlrm
doctest.cpython-38.pyc759740644editdlrm
dummy_threading.cpython-38.pyc11100644editdlrm
enum.cpython-38.pyc259620644editdlrm
filecmp.cpython-38.pyc84270644editdlrm
fileinput.cpython-38.pyc133730644editdlrm
fnmatch.cpython-38.pyc33550644editdlrm
formatter.cpython-38.pyc175450644editdlrm
fractions.cpython-38.pyc187390644editdlrm
ftplib.cpython-38.pyc280070644editdlrm
functools.cpython-38.pyc279010644editdlrm
genericpath.cpython-38.pyc40010644editdlrm
getopt.cpython-38.pyc62710644editdlrm
getpass.cpython-38.pyc41780644editdlrm
gettext.cpython-38.pyc180000644editdlrm
glob.cpython-38.pyc43430644editdlrm
gzip.cpython-38.pyc181840644editdlrm
hashlib.cpython-38.pyc67270644editdlrm
heapq.cpython-38.pyc140700644editdlrm
hmac.cpython-38.pyc63880644editdlrm
imaplib.cpython-38.pyc413420644editdlrm
imghdr.cpython-38.pyc41180644editdlrm
imp.cpython-38.pyc98090644editdlrm
inspect.cpython-38.pyc805930644editdlrm
io.cpython-38.pyc34540644editdlrm
ipaddress.cpython-38.pyc628290644editdlrm
keyword.cpython-38.pyc9980644editdlrm
linecache.cpython-38.pyc38670644editdlrm
locale.cpython-38.pyc346740644editdlrm
lzma.cpython-38.pyc120180644editdlrm
mailbox.cpython-38.pyc602640644editdlrm
mailcap.cpython-38.pyc72060644editdlrm
mimetypes.cpython-38.pyc160310644editdlrm
modulefinder.cpython-38.pyc161150644editdlrm
netrc.cpython-38.pyc37770644editdlrm
nntplib.cpython-38.pyc339740644editdlrm
ntpath.cpython-38.pyc140910644editdlrm
nturl2path.cpython-38.pyc17440644editdlrm
numbers.cpython-38.pyc122020644editdlrm
opcode.cpython-38.pyc54200644editdlrm
operator.cpython-38.pyc136910644editdlrm
optparse.cpython-38.pyc480570644editdlrm
os.cpython-38.pyc313970644editdlrm
pathlib.cpython-38.pyc442090644editdlrm
pdb.cpython-38.pyc472260644editdlrm
pickle.cpython-38.pyc469080644editdlrm
pickletools.cpython-38.pyc672040644editdlrm
pipes.cpython-38.pyc77950644editdlrm
pkgutil.cpython-38.pyc163090644editdlrm
platform.cpython-38.pyc243260644editdlrm
plistlib.cpython-38.pyc273740644editdlrm
poplib.cpython-38.pyc134590644editdlrm
posixpath.cpython-38.pyc104610644editdlrm
pprint.cpython-38.pyc162810644editdlrm
profile.cpython-38.pyc147580644editdlrm
pstats.cpython-38.pyc220660644editdlrm
pty.cpython-38.pyc39550644editdlrm
pyclbr.cpython-38.pyc104510644editdlrm
pydoc.cpython-38.pyc836460644editdlrm
py_compile.cpython-38.pyc73520644editdlrm
queue.cpython-38.pyc106260644editdlrm
quopri.cpython-38.pyc57480644editdlrm
random.cpython-38.pyc201080644editdlrm
re.cpython-38.pyc144220644editdlrm
reprlib.cpython-38.pyc53030644editdlrm
rlcompleter.cpython-38.pyc57550644editdlrm
runpy.cpython-38.pyc81810644editdlrm
sched.cpython-38.pyc65320644editdlrm
secrets.cpython-38.pyc21900644editdlrm
selectors.cpython-38.pyc169350644editdlrm
shelve.cpython-38.pyc94900644editdlrm
shlex.cpython-38.pyc75360644editdlrm
shutil.cpython-38.pyc372190644editdlrm
signal.cpython-38.pyc28430644editdlrm
site.cpython-38.pyc171680644editdlrm
sitecustomize.cpython-38.pyc2200644editdlrm
smtpd.cpython-38.pyc264630644editdlrm
smtplib.cpython-38.pyc355320644editdlrm
sndhdr.cpython-38.pyc69890644editdlrm
socket.cpython-38.pyc277870644editdlrm
socketserver.cpython-38.pyc253610644editdlrm
sre_compile.cpython-38.pyc151420644editdlrm
sre_constants.cpython-38.pyc63590644editdlrm
sre_parse.cpython-38.pyc216470644editdlrm
ssl.cpython-38.pyc450370644editdlrm
stat.cpython-38.pyc43720644editdlrm
statistics.cpython-38.pyc336530644editdlrm
string.cpython-38.pyc73000644editdlrm
stringprep.cpython-38.pyc110170644editdlrm
struct.cpython-38.pyc3300644editdlrm
subprocess.cpython-38.pyc419670644editdlrm
sunau.cpython-38.pyc170800644editdlrm
symbol.cpython-38.pyc24040644editdlrm
symtable.cpython-38.pyc113220644editdlrm
sysconfig.cpython-38.pyc158370644editdlrm
tabnanny.cpython-38.pyc70300644editdlrm
tarfile.cpython-38.pyc630430644editdlrm
telnetlib.cpython-38.pyc182370644editdlrm
tempfile.cpython-38.pyc266530644editdlrm
textwrap.cpython-38.pyc135190644editdlrm
this.cpython-38.pyc12610644editdlrm
threading.cpython-38.pyc399760644editdlrm
timeit.cpython-38.pyc117770644editdlrm
token.cpython-38.pyc24850644editdlrm
tokenize.cpython-38.pyc171600644editdlrm
trace.cpython-38.pyc200260644editdlrm
traceback.cpython-38.pyc199380644editdlrm
tracemalloc.cpython-38.pyc173630644editdlrm
tty.cpython-38.pyc10760644editdlrm
turtle.cpython-38.pyc1300220644editdlrm
types.cpython-38.pyc91770644editdlrm
typing.cpython-38.pyc624200644editdlrm
uu.cpython-38.pyc36050644editdlrm
uuid.cpython-38.pyc236830644editdlrm
warnings.cpython-38.pyc136520644editdlrm
wave.cpython-38.pyc181490644editdlrm
weakref.cpython-38.pyc195180644editdlrm
webbrowser.cpython-38.pyc171200644editdlrm
xdrlib.cpython-38.pyc82210644editdlrm
zipapp.cpython-38.pyc58540644editdlrm
zipfile.cpython-38.pyc593360644editdlrm
zipimport.cpython-38.pyc172750644editdlrm
_bootlocale.cpython-38.pyc12430644editdlrm
_collections_abc.cpython-38.pyc287410644editdlrm
_compat_pickle.cpython-38.pyc55010644editdlrm
_compression.cpython-38.pyc41460644editdlrm
_dummy_thread.cpython-38.pyc60370644editdlrm
_markupbase.cpython-38.pyc77900644editdlrm
_osx_support.cpython-38.pyc115930644editdlrm
_pydecimal.cpython-38.pyc1607350644editdlrm
_pyio.cpython-38.pyc740790644editdlrm
_py_abc.cpython-38.pyc46700644editdlrm
_sitebuiltins.cpython-38.pyc34810644editdlrm
_strptime.cpython-38.pyc160440644editdlrm
_sysconfigdata__linux_x86_64-linux-gnu.cpython-38.pyc211210644editdlrm
_sysconfigdata__x86_64-linux-gnu.cpython-38.pyc211150644editdlrm
_threading_local.cpython-38.pyc64460644editdlrm
_weakrefset.cpython-38.pyc76000644editdlrm
__future__.cpython-38.pyc41580644editdlrm
__phello__.foo.cpython-38.pyc1270644editdlrm
Edit: /snap/core20/2866/usr/lib/python3.8/__pycache__/os.cpython-38.pyc (31397B)
U ʦiS@sdZddlZddlZddlZddlmZejZdddddd d d d d dddddddddgZ ddZ ddZ dekrdZ dZ ddlTzddlmZe dWnek rYnXddlZzdd lmZWnek rYnXddlZe e e[nd!ekrd!Z d"Z ddlTzddlmZe dWnek rBYnXddlZddlZe e e[zdd lmZWnek rYnXned#eejd$<dd%lmZmZmZmZmZmZm Z m!Z![e d&re"Z#d'd(Z$e%Z&e$d)d*e$d+d,e$d-d.e$d/d0e$d1d2e$d3d4e$d5d6e$d7d8e$d9d:e$d;d<e$d=d>e$d?d@e$dAdBe$dCdDe$dCdEe$dFd2e&Z'e%Z&e$d)d*e&Z(e%Z&e$dGdHe$dId,e$dJd.e$dKdLe$dKdMe$dNdOe&)ee$dPdQe$dRd2e$dSd2e$dTdUe dVr2e dWr2e$dXdVe&Z*e%Z&e$d)d*e$d-d.e$d/d0e$dYdZe$d[d,e d\re$d]d.e$d3d4e$d^d2e$d_d0e$d/d0e$dFd2e$d`d0e&Z+[&[[#[$dZ,daZ-dbZ.ddedfZ/dgdhZ0didjZ1e dfdhdjgddldmZ2e dme3ehe'krTe4ehe*krTdddddodpdqZ5drdsZ6e dqdtduZ7dvdwZ8dxdyZ9dzd{Z:d|d}Z;d~dZddlm?Z?Gddde?Z@zeAZBWneCk rddZBYnXde kre dzeDZEWneCk r,ddZEYnXde krBe dddZFeFZG[FdddZHe d!kZIe deIrddZJe@eGjKeJeLeJeLeBeEZM[JdddZNe dddZOeO\ZPZQ[Oe dr0e ds0e dr0dZRdaZSZTe dddgddZUddZVddZWddZXddZYe ddddge drXddZZddZ[e ddge drddZ\ddZ]e ddgdddZ^GdddZ_ddZ`ddZae dseaZbdeb_cGdddejdZee d!krGdddZfddZgdS)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_methodsaltsepcurdirpardirseppathseplinesepdefpathnamepathdevnullSEEK_SETSEEK_CURSEEK_ENDfsencodefsdecode get_exec_pathfdopenpopenextsepcCs |tkSN)globals)r r/usr/lib/python3.8/os.py_exists'srcCs8z t|jWStk r2ddt|DYSXdS)NcSsg|]}|ddkr|qS)r_r).0nrrr .s z%_get_exports_list..)list__all__AttributeErrordir)modulerrr_get_exports_list*s r$posix )*)_exitr()_have_functionsntz zno os specific module foundzos.path)rrrrr rrr r)cCs"|tkr|tkrtt|dSr)_globalsr)_setadd)strfnrrr_addfsr0ZHAVE_FACCESSATaccessZ HAVE_FCHMODATchmodZ HAVE_FCHOWNATchownZ HAVE_FSTATATstatZHAVE_FUTIMESATutimeZ HAVE_LINKATlinkZ HAVE_MKDIRATmkdirZ HAVE_MKFIFOATmkfifoZ HAVE_MKNODATmknodZ HAVE_OPENATopenZHAVE_READLINKATreadlinkZ HAVE_RENAMEATrenameZHAVE_SYMLINKATsymlinkZ HAVE_UNLINKATunlinkrmdirZHAVE_UTIMENSATZ HAVE_FCHDIRchdirZ HAVE_FCHMODZ HAVE_FCHOWNZHAVE_FDOPENDIRlistdirscandirZ HAVE_FEXECVEexecveZHAVE_FTRUNCATEtruncateZ HAVE_FUTIMENSZ HAVE_FUTIMESZHAVE_FPATHCONFpathconfstatvfsfstatvfsZ HAVE_FSTATVFSZ HAVE_LCHFLAGSZchflagsZ HAVE_LCHMODlchownZ HAVE_LCHOWNZ HAVE_LUTIMESZ HAVE_LSTATZ MS_WINDOWSFcCst|\}}|s t|\}}|r||r|t|s|zt||dWntk rVYnXt}t|trpttd}||kr|dSzt||Wn$t k r|rt |sYnXdS)amakedirs(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_okASCIIN) r splitexistsmakedirsFileExistsErrorr isinstancebytesr7OSErrorisdir)r moderLheadtailcdirrrrrPs$   rPcCsjt|t|\}}|s(t|\}}|rf|rfz t|Wntk rTYqfYnXt|\}}q(dS)aremovedirs(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?r rNrT)r rWrXrrr removedirss   rZcCsnt|\}}|r(|r(t|s(t|t||t|\}}|rj|rjz t|Wntk rhYnXdS)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)r rNrOrPr<rZrT)oldnewrWrXrrrrenamess  r]Tc cst|}g}g}g}z t|}Wn8tk rX}z|dk rB||WYdSd}~XYnX|z.z t|} Wntk rYWqpYnXWnBtk r}z$|dk r||WYW5QRdSd}~XYnXz | } Wntk rd} YnX| r|| jn || j|sb| rb|r0d} n.z | } Wntk rVd} YnX| } | rb|| j qbW5QRX|r|||fVt j t j } }|D]4}|||}|s| |st ||||EdHqn,|D]}t ||||EdHq|||fVdS)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 (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 NFT) fspathrBrTnext StopIterationis_dirappendr is_symlinkr islinkjoinwalk)toptopdownonerror followlinksdirsnondirs walk_dirs scandir_iterrorentryra walk_intorcrdredirnamenew_pathrrrrfs^;  "       rf.follow_symlinksdir_fdccst|trt|dst|}|s.t|d|d}t|t|d}zB|s^t |j r|t |t|r|t ||t|t|||EdHW5t|XdS)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 __index__FrurwN)rRinthasattrr^r4r:O_RDONLYclosestS_ISDIRst_moder samestat_fwalkrS)rgrhrirvrworig_sttopfdrrrfwalks!rc cst|}g}g}|s|rdng} |D]} | j} |r:t| } z4| rb|| | dk rl| | n || Wq$tk rz| r|| Wntk rYnXYq$Xq$|r||||fV| dkr|nt|| D]} zN|s|rt| |dd} n"| dk st | \} } | jdd} t | t |d} Wn>tk rj}z|dk rR||WYqW5d}~XYnXz@|st | t| rt || }t| |||||EdHW5t | Xq|s||||fVdS)NF)rwrv)rvry)rBr rrarbrTrczipr4AssertionErrorr:r|r}r rrer)rtoppathisbytesrhrirvrnrkrlentriesrpr rdirfderrdirpathrrrrs\      rcGst||dS)zpexecl(file, *args) Execute the executable file with argument list args, replacing the current process. N)execvfileargsrrrexeclsrcGs |d}t||dd|dS)zexecle(file, *args, env) Execute the executable file with argument list args and environment env, replacing the current process. N)rCrrenvrrrexeclesrcGst||dS)zexeclp(file, *args) Execute the executable file (which is searched for along $PATH) with argument list args, replacing the current process. N)execvprrrrexeclp"srcGs |d}t||dd|dS)zexeclpe(file, *args, env) Execute the executable file (which is searched for along $PATH) with argument list args and environment env, replacing the current process. rN)execvperrrrexeclpe)srcCst||dS)zexecvp(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_execvperrrrr2srcCst|||dS)zexecvpe(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. Nrrrrrr:src Cs|dk rt}||f}nt}|f}t}t|r@||f|dSd}t|}tdkrft|}tt|}|D]~}t ||}z||f|Wqjt t fk r} z| } W5d} ~ XYqjt k r} z| } |dkr| }W5d} ~ XYqjXqj|dk r|| dS)Nr*) rCrenvironr rrrr rmapreFileNotFoundErrorNotADirectoryErrorrT) rrr exec_funcargrest saved_exc path_listr"fullnameelast_excrrrrEs6    rc Csddl}|dkrt}||dtz|d}Wntk rPd}YnXtrz |d}Wnttfk rzYnX|dk rt d|}|dk rt |t rt |}W5QRX|dkrt }|tS)zReturns 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. rNignorePATHsPATHz*env cannot contain 'PATH' and b'PATH' keys)warningsrcatch_warnings simplefilter BytesWarningget TypeErrorsupports_bytes_environKeyError ValueErrorrRrSrr rNr)rrr path_listbrrrres0     )MutableMappingc@sTeZdZddZddZddZddZd d Zd d Zd dZ ddZ ddZ dS)_EnvironcCs.||_||_||_||_||_||_||_dSr) encodekey decodekey encodevalue decodevalueputenvunsetenv_data)selfdatarrrrrrrrr__init__sz_Environ.__init__cCs>z|j||}Wntk r2t|dYnX||Sr)rrrrrkeyvaluerrr __getitem__s z_Environ.__getitem__cCs.||}||}|||||j|<dSr)rrrrrrrr __setitem__s   z_Environ.__setitem__cCsD||}||z |j|=Wntk r>t|dYnXdSr)rrrr)rr encodedkeyrrr __delitem__s    z_Environ.__delitem__ccs$t|j}|D]}||VqdSr)rrr)rkeysrrrr__iter__s z_Environ.__iter__cCs t|jSr)lenrrrrr__len__sz_Environ.__len__cs$ddfddjDS)Nzenviron({{{}}})z, c3s*|]"\}}d||VqdS)z {!r}: {!r}N)formatrr)rrrrrr sz$_Environ.__repr__..)rreritemsrrrr__repr__s  z_Environ.__repr__cCst|Sr)dictrrrrcopysz _Environ.copycCs||kr|||<||Srrrrrr setdefaultsz_Environ.setdefaultN) __name__ __module__ __qualname__rrrrrrrrrrrrrrs  rcCsdSrr)rrrrrrrcCs t|dS)N)_putenvrrrrrrrcstdkrHdd}|t}fdd}i}tD]\}}||||<q0n(tfddfdd }}t}t||||ttS) Nr*cSs t|tstdt|j|S)Nstr expected, not %s)rRr.rtyperrrrr check_strs z!_createenviron..check_strcs |Sr)upperr)encoderrrsz!_createenviron..encodekeycs(t|tstdt|j|dS)Nrsurrogateescape)rRr.rrrrrencodingrrrs z_createenviron..encodecs |dS)Nr)decoderrrrrsz_createenviron..decode) r r.rrsysgetfilesystemencodingrr _unsetenv)rrrrrrr)rrr_createenvirons*   rcCs t||S)zGet 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.)rrrdefaultrrrgetenvsr)rrcCs t|tstdt|j|S)Nzbytes expected, not %s)rRrSrrrrrrr _check_bytess rcCs t||S)zGet 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.)environbrrrrrgetenvbsr)rrcs4ttfdd}fdd}||fS)Ncs&t|}t|tr|S|SdS)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). N)r^rRr.rfilenamererrorsrrr s  z_fscodec..fsencodecs&t|}t|tr|S|SdS)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). N)r^rRrSrrrrrr,s  z_fscodec..fsdecode)rrgetfilesystemencodeerrors)rrrrr_fscodecs   rforkspawnvrP_WAITP_NOWAIT P_NOWAITOcCst|ttfstd|r"|ds*tdt}|spz$|dkrJ|||n ||||WqtdYqXnR|tkr||St|d\}}t |rq|q|t |rt | St |rt |Stdq|dS)Nzargv must be a tuple or a listrz"argv first element cannot be emptyz"Not stopped, signaled or exited???)rRtuplerrrrr(rwaitpid WIFSTOPPED WIFSIGNALEDWTERMSIG WIFEXITED WEXITSTATUSrT)rVrrrfuncpidwpidstsrrr _spawnvefIs,   rcCst|||dtS)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)rrrVrrrrrrhscCst||||tS)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. )rrCrVrrrrrrspawnveqsr cCst|||dtS)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)rrrrrrspawnvp}sr cCst||||tS)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. )rrrrrrspawnvpesr cGs 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. )rrrrrspawnlsr cGs|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. rN)r rrrrspawnlesr cGs t|||S)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. )r rrrrspawnlpsrcGs|d}t|||dd|S)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. rN)r rrrrspawnlpesrrrcCst|tstdt||dkr.td||dks>|dkrFtdddl}ddl}|dkr|j|d|j|d}t | |j |S|j|d|j|d }t | |j |SdS) Nz&invalid cmd type (%s, expected string))rwzinvalid mode %rrz+popen() does not support unbuffered streamsrT)shellstdoutbufsize)rstdinr) rRr.rrr subprocessioPopenPIPE _wrap_close TextIOWrapperrr)cmdrV bufferingrrprocrrrrs(  c@s<eZdZddZddZddZddZd d Zd d Zd S)rcCs||_||_dSr)_stream_proc)rstreamrrrrrsz_wrap_close.__init__cCs8|j|j}|dkr dStdkr,|S|d>SdS)Nrr*)rr}r waitr )r returncoderrrr}s  z_wrap_close.closecCs|Srrrrrr __enter__sz_wrap_close.__enter__cGs |dSrr}rrrrr__exit__sz_wrap_close.__exit__cCs t|j|Sr)getattrr)rr rrr __getattr__sz_wrap_close.__getattr__cCs t|jSr)iterrrrrrrsz_wrap_close.__iter__N) rrrrr}r%r(r*rrrrrrs  rcOs4t|tstdt|ddl}|j|f||S)Nz&invalid fd type (%s, expected integer)r)rRrzrrrr:)fdrkwargsrrrrrs cCst|ttfr|St|}z||}Wn0tk rXt|drFntd|jYnXt|ttfrl|Std |jt|jdS)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 {}N) rRr.rSrr.r!r{rrr)r path_type path_reprrrr_fspaths"  r1r^c@s*eZdZdZejddZeddZdS)PathLikezCAbstract base class for implementing the file system path protocol.cCstdS)z9Return the file system path representation of the object.N)NotImplementedErrorrrrrr.,szPathLike.__fspath__cCs|tkrt|dStS)Nr.)r2rNotImplemented)clssubclassrrr__subclasshook__1s zPathLike.__subclasshook__N) rrr__doc__abcabstractmethodr. classmethodr7rrrrr2(s  r2c@s4eZdZddZddZddZddZd d Zd S) _AddedDllDirectorycCs||_||_||_dSr)r _cookie_remove_dll_directory)rr cookieZremove_dll_directoryrrrr:sz_AddedDllDirectory.__init__cCs||jd|_dSr)r>r=r rrrrr}>s z_AddedDllDirectory.closecCs|Srrrrrrr%Asz_AddedDllDirectory.__enter__cGs |dSrr&r'rrrr(Csz_AddedDllDirectory.__exit__cCs|jrd|jSdS)Nzz)r rrrrrrEs z_AddedDllDirectory.__repr__N)rrrrr}r%r(rrrrrr<9s r<cCs ddl}||}t|||jS)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_directoryr<r>)r r*r?rrradd_dll_directoryJs  r@)rKF)TNF)rtTN)N)N)N)N)rr)hr8r9rr4r~_collections_abcrbuiltin_module_namesZ_namesr rr$r rr%r(rb ImportError posixpathr r)extendr*Zntpathmodulesos.pathrrrrr rrr rr+r0setr,supports_dir_fdsupports_effective_idsr- supports_fdsupports_follow_symlinksr rrrPrZr]rfr:rBrrrrrrrrrrrrrr NameErrorrrrrrrrrrSrrrrrrrrrrr r r r r rrrrrr1r^rABCr2r<r@rrrrs      (                                              08    - 7