/snap/core22/2437/usr/lib/python3.10/__pycache__
NameSizeModeActions
abc.cpython-310.pyc67510644editdlrm
aifc.cpython-310.pyc246850644editdlrm
antigravity.cpython-310.pyc8220644editdlrm
argparse.cpython-310.pyc635390644editdlrm
ast.cpython-310.pyc557390644editdlrm
asynchat.cpython-310.pyc70250644editdlrm
asyncore.cpython-310.pyc160020644editdlrm
base64.cpython-310.pyc171620644editdlrm
bdb.cpython-310.pyc258320644editdlrm
binhex.cpython-310.pyc128700644editdlrm
bisect.cpython-310.pyc25880644editdlrm
bz2.cpython-310.pyc108700644editdlrm
calendar.cpython-310.pyc263030644editdlrm
cgi.cpython-310.pyc267230644editdlrm
cgitb.cpython-310.pyc99980644editdlrm
chunk.cpython-310.pyc48600644editdlrm
cmd.cpython-310.pyc127070644editdlrm
code.cpython-310.pyc99570644editdlrm
codecs.cpython-310.pyc332190644editdlrm
codeop.cpython-310.pyc55950644editdlrm
colorsys.cpython-310.pyc32650644editdlrm
compileall.cpython-310.pyc127330644editdlrm
configparser.cpython-310.pyc454580644editdlrm
contextlib.cpython-310.pyc208950644editdlrm
contextvars.cpython-310.pyc2460644editdlrm
copy.cpython-310.pyc69960644editdlrm
copyreg.cpython-310.pyc46830644editdlrm
cProfile.cpython-310.pyc51130644editdlrm
crypt.cpython-310.pyc35500644editdlrm
csv.cpython-310.pyc117980644editdlrm
dataclasses.cpython-310.pyc265780644editdlrm
datetime.cpython-310.pyc565330644editdlrm
decimal.cpython-310.pyc3620644editdlrm
difflib.cpython-310.pyc589050644editdlrm
dis.cpython-310.pyc156560644editdlrm
doctest.cpython-310.pyc761750644editdlrm
enum.cpython-310.pyc260630644editdlrm
filecmp.cpython-310.pyc87490644editdlrm
fileinput.cpython-310.pyc140720644editdlrm
fnmatch.cpython-310.pyc42440644editdlrm
fractions.cpython-310.pyc186000644editdlrm
ftplib.cpython-310.pyc289770644editdlrm
functools.cpython-310.pyc283350644editdlrm
genericpath.cpython-310.pyc39070644editdlrm
getopt.cpython-310.pyc63390644editdlrm
getpass.cpython-310.pyc42100644editdlrm
gettext.cpython-310.pyc182210644editdlrm
glob.cpython-310.pyc58520644editdlrm
graphlib.cpython-310.pyc76160644editdlrm
gzip.cpython-310.pyc185460644editdlrm
hashlib.cpython-310.pyc68450644editdlrm
heapq.cpython-310.pyc138650644editdlrm
hmac.cpython-310.pyc69730644editdlrm
imaplib.cpython-310.pyc423120644editdlrm
imghdr.cpython-310.pyc39050644editdlrm
imp.cpython-310.pyc97860644editdlrm
inspect.cpython-310.pyc851530644editdlrm
io.cpython-310.pyc36630644editdlrm
ipaddress.cpython-310.pyc626700644editdlrm
keyword.cpython-310.pyc9270644editdlrm
linecache.cpython-310.pyc41420644editdlrm
locale.cpython-310.pyc461540644editdlrm
lzma.cpython-310.pyc121000644editdlrm
mailbox.cpython-310.pyc600910644editdlrm
mailcap.cpython-310.pyc73200644editdlrm
mimetypes.cpython-310.pyc176190644editdlrm
modulefinder.cpython-310.pyc161660644editdlrm
netrc.cpython-310.pyc39330644editdlrm
nntplib.cpython-310.pyc316230644editdlrm
ntpath.cpython-310.pyc147040644editdlrm
nturl2path.cpython-310.pyc17470644editdlrm
numbers.cpython-310.pyc118660644editdlrm
opcode.cpython-310.pyc54470644editdlrm
operator.cpython-310.pyc135080644editdlrm
optparse.cpython-310.pyc477540644editdlrm
os.cpython-310.pyc315990644editdlrm
pathlib.cpython-310.pyc420520644editdlrm
pdb.cpython-310.pyc474400644editdlrm
pickle.cpython-310.pyc468820644editdlrm
pickletools.cpython-310.pyc677600644editdlrm
pipes.cpython-310.pyc77690644editdlrm
pkgutil.cpython-310.pyc183610644editdlrm
platform.cpython-310.pyc274290644editdlrm
plistlib.cpython-310.pyc237650644editdlrm
poplib.cpython-310.pyc135730644editdlrm
posixpath.cpython-310.pyc105600644editdlrm
pprint.cpython-310.pyc178750644editdlrm
profile.cpython-310.pyc143910644editdlrm
pstats.cpython-310.pyc236210644editdlrm
pty.cpython-310.pyc41430644editdlrm
pyclbr.cpython-310.pyc97750644editdlrm
pydoc.cpython-310.pyc856450644editdlrm
py_compile.cpython-310.pyc73390644editdlrm
queue.cpython-310.pyc107920644editdlrm
quopri.cpython-310.pyc57940644editdlrm
random.cpython-310.pyc227480644editdlrm
re.cpython-310.pyc142270644editdlrm
reprlib.cpython-310.pyc52500644editdlrm
rlcompleter.cpython-310.pyc59540644editdlrm
runpy.cpython-310.pyc94110644editdlrm
sched.cpython-310.pyc61150644editdlrm
secrets.cpython-310.pyc21750644editdlrm
selectors.cpython-310.pyc171050644editdlrm
shelve.cpython-310.pyc94920644editdlrm
shlex.cpython-310.pyc77820644editdlrm
shutil.cpython-310.pyc385360644editdlrm
signal.cpython-310.pyc29350644editdlrm
site.cpython-310.pyc179220644editdlrm
sitecustomize.cpython-310.pyc2250644editdlrm
smtpd.cpython-310.pyc261470644editdlrm
smtplib.cpython-310.pyc357660644editdlrm
sndhdr.cpython-310.pyc69620644editdlrm
socket.cpython-310.pyc289630644editdlrm
socketserver.cpython-310.pyc253470644editdlrm
sre_compile.cpython-310.pyc151940644editdlrm
sre_constants.cpython-310.pyc63570644editdlrm
sre_parse.cpython-310.pyc217550644editdlrm
ssl.cpython-310.pyc452710644editdlrm
stat.cpython-310.pyc42730644editdlrm
statistics.cpython-310.pyc370510644editdlrm
string.cpython-310.pyc71020644editdlrm
stringprep.cpython-310.pyc170750644editdlrm
struct.cpython-310.pyc3070644editdlrm
subprocess.cpython-310.pyc447410644editdlrm
sunau.cpython-310.pyc164820644editdlrm
symtable.cpython-310.pyc128350644editdlrm
sysconfig.cpython-310.pyc181510644editdlrm
tabnanny.cpython-310.pyc69500644editdlrm
tarfile.cpython-310.pyc706740644editdlrm
telnetlib.cpython-310.pyc185060644editdlrm
tempfile.cpython-310.pyc273390644editdlrm
textwrap.cpython-310.pyc138120644editdlrm
this.cpython-310.pyc12640644editdlrm
threading.cpython-310.pyc449690644editdlrm
timeit.cpython-310.pyc117690644editdlrm
token.cpython-310.pyc27380644editdlrm
tokenize.cpython-310.pyc171940644editdlrm
trace.cpython-310.pyc198700644editdlrm
traceback.cpython-310.pyc217120644editdlrm
tracemalloc.cpython-310.pyc175250644editdlrm
tty.cpython-310.pyc10790644editdlrm
turtle.cpython-310.pyc1288570644editdlrm
types.cpython-310.pyc95250644editdlrm
typing.cpython-310.pyc852770644editdlrm
uu.cpython-310.pyc38670644editdlrm
uuid.cpython-310.pyc224980644editdlrm
warnings.cpython-310.pyc136460644editdlrm
wave.cpython-310.pyc175940644editdlrm
weakref.cpython-310.pyc203430644editdlrm
webbrowser.cpython-310.pyc170000644editdlrm
xdrlib.cpython-310.pyc78800644editdlrm
zipapp.cpython-310.pyc60130644editdlrm
zipfile.cpython-310.pyc618450644editdlrm
zipimport.cpython-310.pyc170330644editdlrm
_aix_support.cpython-310.pyc28790644editdlrm
_bootsubprocess.cpython-310.pyc22940644editdlrm
_collections_abc.cpython-310.pyc329250644editdlrm
_compat_pickle.cpython-310.pyc58720644editdlrm
_compression.cpython-310.pyc45120644editdlrm
_distutils_system_mod.cpython-310.pyc54220644editdlrm
_markupbase.cpython-310.pyc75720644editdlrm
_osx_support.cpython-310.pyc115350644editdlrm
_pydecimal.cpython-310.pyc1577360644editdlrm
_pyio.cpython-310.pyc736540644editdlrm
_py_abc.cpython-310.pyc46830644editdlrm
_sitebuiltins.cpython-310.pyc35470644editdlrm
_strptime.cpython-310.pyc159450644editdlrm
_sysconfigdata__linux_x86_64-linux-gnu.cpython-310.pyc353850644editdlrm
_sysconfigdata__x86_64-linux-gnu.cpython-310.pyc353790644editdlrm
_threading_local.cpython-310.pyc65390644editdlrm
_weakrefset.cpython-310.pyc76080644editdlrm
__future__.cpython-310.pyc41310644editdlrm
__phello__.foo.cpython-310.pyc1300644editdlrm
Edit: /snap/core22/2437/usr/lib/python3.10/__pycache__/os.cpython-310.pyc (31599B)
o p̦i@shdZddlZddlZddlZddlmZeee Z ej Z gdZ ddZddZd e vrod Zd Zdd lTz dd lmZe d Wn eyKYnwddlZzddlmZWn eyaYnwddlZe ee[nIde vrdZdZdd lTz dd lmZe d Wn eyYnwddlZddlZe ee[zddlmZWn eyYnwedeejd<ddlmZmZm Z m!Z!m"Z"m#Z#m$Z$m%Z%[ edre&Z'ddZ(e)Z*e(dde(dde(dde(dde(dd e(d!d"e(d#d$e(d%d&e(d'd(e(d)d*e(d+d,e(d-d.e(d/d0e(d1d2e(d1d3e(d4d e*Z+e)Z*e(dde*Z,e)Z*e(d5d6e(d7de(d8de(d9d:e(d9d;e(dd?e(d@d e(dAd e(dBdCedDredEre(dFdDe*Z.e)Z*e(dde(dde(dde(dGdHe(dIdedJre(dKde(d!d"e(dLd e(dMde(dde(d4d e(dNde*Z/[*[['[(dZ0dOZ1dPZ2ddSdTZ3dUdVZ4dWdXZ5e gdYdd[d\Z6d]d^Z7e d\e8ehe+kre9ehe.krddRdd`dadbZ:dcddZ;e dbdedfZdkdlZ?dmdnZ@dodpZAe gdqddrdsZBddtduZCddvlmDZDmEZEGdwdxdxeDZFdydzZGeGZH[Gdd{d|ZIedkZJe d}eJrd~dZKeFeHjLeKeMeKeMZN[KdddZOe dddZPeP\ZQZR[PedredsedrdZSdOZTZUe gdddZVddZWddZXddZYddZZe gdedrddZ[ddZ\e ddgedrddZ]ddZ^e ddgej_dkrdddZ`GdddZae ddddZbddZcedsecZdded_eGdddejfZgedkr2GdddZhddZidSdS)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)altsepcurdirpardirseppathseplinesepdefpathnamepathdevnullSEEK_SETSEEK_CURSEEK_ENDfsencodefsdecode get_exec_pathfdopenextsepcCs |tvSN)globals)r r/usr/lib/python3.10/os.py_exists) rcCs2zt|jWStyddt|DYSw)NcSsg|] }|ddkr|qS)r_r).0nrrr 0sz%_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*|tvr|tvrtt|dSdSdSr)_globalsr)_setadd)strfnrrr_addhsr0HAVE_FACCESSATaccess HAVE_FCHMODATchmod HAVE_FCHOWNATchown HAVE_FSTATATstatHAVE_FUTIMESATutime HAVE_LINKATlink HAVE_MKDIRATmkdir HAVE_MKFIFOATmkfifo HAVE_MKNODATmknod HAVE_OPENATopenHAVE_READLINKATreadlink HAVE_RENAMEATrenameHAVE_SYMLINKATsymlink HAVE_UNLINKATunlinkrmdirHAVE_UTIMENSAT HAVE_FCHDIRchdir HAVE_FCHMOD HAVE_FCHOWNHAVE_FDOPENDIRlistdirscandir HAVE_FEXECVEexecveHAVE_FTRUNCATEtruncate HAVE_FUTIMENS HAVE_FUTIMESHAVE_FPATHCONFpathconfstatvfsfstatvfs HAVE_FSTATVFS HAVE_LCHFLAGSchflags HAVE_LCHMODlchown HAVE_LCHOWN HAVE_LUTIMES HAVE_LSTAT MS_WINDOWSFcCst|\}}|st|\}}|r=|r=t|s=zt||dWn ty*Ynwt}t|tr7ttd}||kr=dSzt||WdSt yW|rSt |sTYdSw)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 isinstancebytesr>OSErrorisdir)r moderlheadtailcdirrrrrps*     rpcCsxt|t|\}}|st|\}}|r6|r8zt|Wn ty(YdSwt|\}}|r:|sdSdSdSdS)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)rMr rnrt)r rwrxrrr removedirss   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)r rnrorprHrzrt)oldnewrwrxrrrrenamess  r})rprzr}TcCs$td||||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)sysaudit_walkfspath)toptopdownonerror followlinksrrrwalks<rc csg}g}g}zt|}Wnty(}z|dur||WYd}~dSd}~ww| zzt|} Wn ty>YWnlwWn!tya}z|durP||WYd}~WddSd}~wwz| } Wn tysd} Ynw| r}|| jn|| j|s| r|rd} nz| } Wn tyd} Ynw| } | r|| jq-Wdn1swY|r|||fVtj tj } }|D]}|||}|s| |st ||||EdHqdS|D] }t ||||EdHq|||fVdS)NTF) rUrtnext StopIterationis_dirappendr is_symlinkr islinkjoinr)rrrrdirsnondirs walk_dirs scandir_iterrorentryr walk_intorrrdirnamenew_pathrrrrYs|          +    r.follow_symlinksdir_fdccstd|||||t|trt|dst|}|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__FrrN)r~rrrinthasattrrr8rDO_RDONLYstS_ISDIRst_moder samestat_fwalkrsclose)rrrrrorig_sttopfdrrrfwalks&!  rc cst|}g}g}|s |rdng} |D]C} | j} |rt| } z| r2|| | dur1| | n|| WqtyVz | rI|| Wn tySYnwYqw|r`||||fV| durf|nt|| D]i} z%|s|rzt| |dd} n| dusJ| \} } | jdd} t | t |d} Wnty}z|dur||WYd}~qkd}~wwz"|st | t| rt || }t| |||||EdHWt| qkt| w|s||||fVdSdS)NF)rr)rr)rUr rrrrtrzipr8rDrr rrrr)rtoppathisbytesrrrrrrentriesrr rdirfderrdirpathrrrrsn           rcGt||dS)zpexecl(file, *args) Execute the executable file with argument list args, replacing the current process. N)execvfileargsrrrexeclrcG |d}t||dd|dS)zexecle(file, *args, env) Execute the executable file with argument list args and environment env, replacing the current process. N)rWrrenvrrrexecle!srcGr)zexeclp(file, *args) Execute the executable file (which is searched for along $PATH) with argument list args, replacing the current process. N)execvprrrrexeclp)rrcGr)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)execvperrrrexeclpe0srcCr)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_execvperrrrr9srcCst|||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. NrrrrrrAr)rrrrrrc Cs|dur t}||f}nt}|f}t}t|r!||g|RdSd}t|}tdkr4t|}tt|}|D]A}t ||}z ||g|RWq6t t fy^} z| } WYd} ~ q6d} ~ wt yw} z| } |durm| }WYd} ~ q6d} ~ ww|dur~|| )Nr*) rWrenvironr rrr rmaprFileNotFoundErrorNotADirectoryErrorrt) rrr exec_funcargrest saved_exc path_listr"fullnameelast_excrrrrLs<    rc Csddl}|dur t}|L|dtz|d}Wn ty'd}YnwtrSz|d}Wn ttfy;Yn w|durDt d|}|durSt |t rSt |}Wdn1s]wY|durht }|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_listbrrrrls8      r)MutableMappingMappingc@sleZdZddZddZddZddZd d Zd d Zd dZ ddZ ddZ ddZ ddZ ddZdS)_EnvironcCs"||_||_||_||_||_dSr) encodekey decodekey encodevalue decodevalue_data)selfdatarrrrrrr__init__s  z_Environ.__init__cCs8z |j||}Wn tyt|dw||Sr)rrrrrkeyvaluerrr __getitem__s    z_Environ.__getitem__cCs,||}||}t||||j|<dSr)rrputenvrrrrr __setitem__s   z_Environ.__setitem__cCs:||}t|z|j|=WdStyt|dwr)runsetenvrr)rr encodedkeyrrr __delitem__s   z_Environ.__delitem__ccs&t|j}|D]}||VqdSr)rrr)rkeysrrrr__iter__s  z_Environ.__iter__cC t|jSr)lenrrrrr__len__rz_Environ.__len__cs$ddfddjDS)Nzenviron({{{}}})z, c3s,|]\}}d||VqdS)z {!r}: {!r}N)formatrr)rrrrrr s z$_Environ.__repr__..)rrritemsrrrr__repr__s  z_Environ.__repr__cCst|Sr)dictrrrrcopysz _Environ.copycCs||vr|||<||Srrrrrr setdefaultsz_Environ.setdefaultcCs|||Sr)update)rotherrrr__ior__s z_Environ.__ior__cCs$t|tstSt|}|||SrrrrNotImplementedrrrrr|rrr__or__  z_Environ.__or__cCs$t|tstSt|}|||Srrrrrr__ror__rz_Environ.__ror__N)__name__ __module__ __qualname__rrrrrrrrrrrrrrrrrs  rcstdkr$dd}|t}fdd}i}tD] \}}||||<qntfddfdd }}t}t||||S) Nr*cS t|tstdt|j|S)Nstr expected, not %s)rrr.rtyperrrrr check_str z!_createenviron..check_strcs |Sr)upper)r)encoderrr z!_createenviron..encodekeycs(t|tstdt|j|dS)Nrsurrogateescape)rrr.rr rrr encodingrrrs  z_createenviron..encodecs |dS)Nr)decoder rrrrrz_createenviron..decode)r r.rrr~getfilesystemencodingr)r rrrrrr)rrr_createenvirons$   rcC 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.)rrrdefaultrrrgetenv r)rrcCr)Nzbytes expected, not %s)rrrsrr rr rrr _check_bytesr rcCr)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.)environbrrrrrgetenvbrr)rrcs4ttfdd}fdd}||fS)Nc"t|}t|tr|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). )rrrr.rfilenamererrorsrrr%  z_fscodec..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). )rrrrsrrr!rrr1r#z_fscodec..fsdecode)r~rgetfilesystemencodeerrors)rrrr!r_fscodec!s   r%forkspawnvr)P_WAITP_NOWAIT P_NOWAITOcCst|ttfs td|r|dstdt}|s;z|dur%|||n ||||WdSWdStdYdS|tkrA|S t|d\}}t |rNqAt |S)Nzargv must be a tuple or a listrz"argv first element cannot be empty) rrtuplerrrr&r(r)waitpid WIFSTOPPEDwaitstatus_to_exitcode)rvrrrfuncpidwpidstsrrr _spawnvefNs(  r4cCt|||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)r4rrvrrrrrr'ircCt||||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. )r4rWrvrrrrrrspawnverr9cCr5)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)r4rr6rrrspawnvp~r:r;cCr7)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. )r4rr8rrrspawnvper:r<)r'r9r;r<cG 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. )r'r6rrrspawnls r>cG|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)r9r8rrrspawnler@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. )r;r6rrrspawnlps rBcGr?)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<r8rrrspawnlperArCvxworksrrcCst|ts tdt||dvrtd||dks|dur#tdddl}ddl}|dkr@|j|dd|j|d}t |j |S|j|dd|j|d }t |j |S) Nz&invalid cmd type (%s, expected string))rEwzinvalid mode %rrz+popen() does not support unbuffered streamsrET)shelltextstdoutbufsize)rGrHstdinrJ) rrr.rr r subprocessioPopenPIPE _wrap_closerIrK)cmdrv bufferingrLrMprocrrrpopens(    rTc@s<eZdZddZddZddZddZd d Zd d Zd S)rPcCs||_||_dSr)_stream_proc)rstreamrSrrrrs z_wrap_close.__init__cCs4|j|j}|dkrdStdkr|S|d>S)Nrr*)rUrrVwaitr )r returncoderrrrs  z_wrap_close.closecC|Srrrrrr __enter__z_wrap_close.__enter__cG |dSrrrrrrr__exit__rz_wrap_close.__exit__cCs t|j|Sr)getattrrU)rr rrr __getattr__rz_wrap_close.__getattr__cCrr)iterrUrrrrrrz_wrap_close.__iter__N) rrrrrr\rarcrrrrrrPs  rPcOsRt|ts tdt|ddl}d|vr||}|j||||g|Ri|S)Nz&invalid fd type (%s, expected integer)rb)rrrrr rM text_encodingrD)fdrvrRrrkwargsrMrrrrs  rcCs|t|ttfr |St|}z||}Wnty(t|dr!td|jwt|ttfr2|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!rrrr)r path_type path_reprrrr_fspath s&  rlrc@s2eZdZdZejddZeddZee Z dS)PathLikezCAbstract base class for implementing the file system path protocol.cCst)z9Return the file system path representation of the object.)NotImplementedErrorrrrrri3szPathLike.__fspath__cCs|tur t|dStS)Nri)rmrr)clssubclassrrr__subclasshook__8s zPathLike.__subclasshook__N) rrr__doc__abcabstractmethodri classmethodrq GenericAlias__class_getitem__rrrrrm/s   rmc@s4eZdZddZddZddZddZd d Zd S) _AddedDllDirectorycCs||_||_||_dSr)r _cookie_remove_dll_directory)rr cookieremove_dll_directoryrrrrCs z_AddedDllDirectory.__init__cCs||jd|_dSr)rzryr rrrrrGs  z_AddedDllDirectory.closecCr[rrrrrrr\Jr]z_AddedDllDirectory.__enter__cGr^rr_r`rrrraLrz_AddedDllDirectory.__exit__cCs|jr d|jSdS)Nzz)r rrrrrrNs z_AddedDllDirectory.__repr__N)rrrrrr\rarrrrrrxBs  rxcCs 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*_add_dll_directoryrxrz)r r*r{rrradd_dll_directorySs r~)rkF)TNF)rTNr)rEr)rErN)jrrrsr~r8r_collections_abcrr rrrvbuiltin_module_names_namesr rr$r rr%r(r ImportError posixpathr r)extendr*ntpathmodulesos.pathrrrrr rrr rr+r0setr,supports_dir_fdsupports_effective_idsr- supports_fdsupports_follow_symlinksr rrrprzr}rrrDrUrrrrrrrrrrrrrrrrrrrrsrrr%rrr(r)r*r4r'r9r;r<r>r@rBrCplatformrTrPrrlrrABCrmrxr~rrrrsr         (                                              ? R1 8   -G