/snap/core24/1643/usr/lib/python3.12/__pycache__
NameSizeModeActions
abc.cpython-312.pyc80550644editdlrm
aifc.cpython-312.pyc428630644editdlrm
antigravity.cpython-312.pyc10030644editdlrm
argparse.cpython-312.pyc1016820644editdlrm
ast.cpython-312.pyc1002790644editdlrm
base64.cpython-312.pyc244080644editdlrm
bdb.cpython-312.pyc373590644editdlrm
bisect.cpython-312.pyc36410644editdlrm
bz2.cpython-312.pyc151330644editdlrm
calendar.cpython-312.pyc396210644editdlrm
cgi.cpython-312.pyc402280644editdlrm
cgitb.cpython-312.pyc173320644editdlrm
chunk.cpython-312.pyc73100644editdlrm
cmd.cpython-312.pyc186190644editdlrm
code.cpython-312.pyc130510644editdlrm
codecs.cpython-312.pyc422740644editdlrm
codeop.cpython-312.pyc69160644editdlrm
colorsys.cpython-312.pyc46420644editdlrm
compileall.cpython-312.pyc204970644editdlrm
configparser.cpython-312.pyc635820644editdlrm
contextlib.cpython-312.pyc303760644editdlrm
contextvars.cpython-312.pyc2610644editdlrm
copy.cpython-312.pyc98000644editdlrm
copyreg.cpython-312.pyc74140644editdlrm
cProfile.cpython-312.pyc85930644editdlrm
crypt.cpython-312.pyc53610644editdlrm
csv.cpython-312.pyc177880644editdlrm
dataclasses.cpython-312.pyc446780644editdlrm
datetime.cpython-312.pyc4090644editdlrm
decimal.cpython-312.pyc4060644editdlrm
difflib.cpython-312.pyc754990644editdlrm
dis.cpython-312.pyc345600644editdlrm
doctest.cpython-312.pyc1056860644editdlrm
enum.cpython-312.pyc807080644editdlrm
filecmp.cpython-312.pyc146610644editdlrm
fileinput.cpython-312.pyc202800644editdlrm
fnmatch.cpython-312.pyc64950644editdlrm
fractions.cpython-312.pyc366670644editdlrm
ftplib.cpython-312.pyc426360644editdlrm
functools.cpython-312.pyc405060644editdlrm
genericpath.cpython-312.pyc68220644editdlrm
getopt.cpython-312.pyc83630644editdlrm
getpass.cpython-312.pyc68500644editdlrm
gettext.cpython-312.pyc221510644editdlrm
glob.cpython-312.pyc98410644editdlrm
graphlib.cpython-312.pyc103270644editdlrm
gzip.cpython-312.pyc320150644editdlrm
hashlib.cpython-312.pyc80870644editdlrm
heapq.cpython-312.pyc179560644editdlrm
hmac.cpython-312.pyc106980644editdlrm
imaplib.cpython-312.pyc628890644editdlrm
imghdr.cpython-312.pyc69440644editdlrm
inspect.cpython-312.pyc1334460644editdlrm
io.cpython-312.pyc41390644editdlrm
ipaddress.cpython-312.pyc907620644editdlrm
keyword.cpython-312.pyc10410644editdlrm
linecache.cpython-312.pyc64010644editdlrm
locale.cpython-312.pyc595360644editdlrm
lzma.cpython-312.pyc158550644editdlrm
mailbox.cpython-312.pyc1116180644editdlrm
mailcap.cpython-312.pyc111550644editdlrm
mimetypes.cpython-312.pyc241850644editdlrm
modulefinder.cpython-312.pyc279440644editdlrm
netrc.cpython-312.pyc89030644editdlrm
nntplib.cpython-312.pyc449390644editdlrm
ntpath.cpython-312.pyc260330644editdlrm
nturl2path.cpython-312.pyc30340644editdlrm
numbers.cpython-312.pyc139670644editdlrm
opcode.cpython-312.pyc147160644editdlrm
operator.cpython-312.pyc173640644editdlrm
optparse.cpython-312.pyc675460644editdlrm
os.cpython-312.pyc434740644editdlrm
pathlib.cpython-312.pyc620980644editdlrm
pdb.cpython-312.pyc849190644editdlrm
pickle.cpython-312.pyc761760644editdlrm
pickletools.cpython-312.pyc811280644editdlrm
pipes.cpython-312.pyc109140644editdlrm
pkgutil.cpython-312.pyc199590644editdlrm
platform.cpython-312.pyc416000644editdlrm
plistlib.cpython-312.pyc412860644editdlrm
poplib.cpython-312.pyc184460644editdlrm
posixpath.cpython-312.pyc182360644editdlrm
pprint.cpython-312.pyc294740644editdlrm
profile.cpython-312.pyc225400644editdlrm
pstats.cpython-312.pyc379220644editdlrm
pty.cpython-312.pyc73630644editdlrm
pyclbr.cpython-312.pyc148870644editdlrm
pydoc.cpython-312.pyc1429550644editdlrm
py_compile.cpython-312.pyc100780644editdlrm
queue.cpython-312.pyc147320644editdlrm
quopri.cpython-312.pyc93230644editdlrm
random.cpython-312.pyc331530644editdlrm
reprlib.cpython-312.pyc99090644editdlrm
rlcompleter.cpython-312.pyc82820644editdlrm
runpy.cpython-312.pyc143850644editdlrm
sched.cpython-312.pyc77350644editdlrm
secrets.cpython-312.pyc25560644editdlrm
selectors.cpython-312.pyc261280644editdlrm
shelve.cpython-312.pyc129130644editdlrm
shlex.cpython-312.pyc141620644editdlrm
shutil.cpython-312.pyc681130644editdlrm
signal.cpython-312.pyc44480644editdlrm
site.cpython-312.pyc290630644editdlrm
sitecustomize.cpython-312.pyc3000644editdlrm
smtplib.cpython-312.pyc482210644editdlrm
sndhdr.cpython-312.pyc107120644editdlrm
socket.cpython-312.pyc418170644editdlrm
socketserver.cpython-312.pyc342580644editdlrm
sre_compile.cpython-312.pyc6250644editdlrm
sre_constants.cpython-312.pyc6280644editdlrm
sre_parse.cpython-312.pyc6210644editdlrm
ssl.cpython-312.pyc630110644editdlrm
stat.cpython-312.pyc52310644editdlrm
statistics.cpython-312.pyc554230644editdlrm
string.cpython-312.pyc114820644editdlrm
stringprep.cpython-312.pyc251600644editdlrm
struct.cpython-312.pyc3250644editdlrm
subprocess.cpython-312.pyc791870644editdlrm
sunau.cpython-312.pyc254230644editdlrm
symtable.cpython-312.pyc187810644editdlrm
sysconfig.cpython-312.pyc300010644editdlrm
tabnanny.cpython-312.pyc121560644editdlrm
tarfile.cpython-312.pyc1233880644editdlrm
telnetlib.cpython-312.pyc284230644editdlrm
tempfile.cpython-312.pyc473390644editdlrm
textwrap.cpython-312.pyc182930644editdlrm
this.cpython-312.pyc14080644editdlrm
threading.cpython-312.pyc653460644editdlrm
timeit.cpython-312.pyc148640644editdlrm
token.cpython-312.pyc35570644editdlrm
tokenize.cpython-312.pyc247750644editdlrm
trace.cpython-312.pyc330240644editdlrm
traceback.cpython-312.pyc515230644editdlrm
tracemalloc.cpython-312.pyc269070644editdlrm
tty.cpython-312.pyc26680644editdlrm
turtle.cpython-312.pyc1846320644editdlrm
types.cpython-312.pyc149390644editdlrm
typing.cpython-312.pyc1418600644editdlrm
uu.cpython-312.pyc78160644editdlrm
uuid.cpython-312.pyc330070644editdlrm
warnings.cpython-312.pyc237920644editdlrm
wave.cpython-312.pyc320840644editdlrm
weakref.cpython-312.pyc313480644editdlrm
webbrowser.cpython-312.pyc263530644editdlrm
xdrlib.cpython-312.pyc118410644editdlrm
zipapp.cpython-312.pyc99770644editdlrm
zipimport.cpython-312.pyc244750644editdlrm
_aix_support.cpython-312.pyc47590644editdlrm
_collections_abc.cpython-312.pyc459120644editdlrm
_compat_pickle.cpython-312.pyc72210644editdlrm
_compression.cpython-312.pyc74970644editdlrm
_distutils_system_mod.cpython-312.pyc78180644editdlrm
_markupbase.cpython-312.pyc122790644editdlrm
_osx_support.cpython-312.pyc177310644editdlrm
_pydatetime.cpython-312.pyc941930644editdlrm
_pydecimal.cpython-312.pyc2278070644editdlrm
_pyio.cpython-312.pyc1102690644editdlrm
_pylong.cpython-312.pyc99830644editdlrm
_py_abc.cpython-312.pyc70540644editdlrm
_sitebuiltins.cpython-312.pyc47600644editdlrm
_strptime.cpython-312.pyc241160644editdlrm
_sysconfigdata__linux_x86_64-linux-gnu.cpython-312.pyc586510644editdlrm
_sysconfigdata__x86_64-linux-gnu.cpython-312.pyc586450644editdlrm
_threading_local.cpython-312.pyc82950644editdlrm
_weakrefset.cpython-312.pyc117510644editdlrm
__future__.cpython-312.pyc47040644editdlrm
__hello__.cpython-312.pyc8700644editdlrm
Edit: /snap/core24/1643/usr/lib/python3.12/__pycache__/platform.cpython-312.pyc (41600B)
ЦiC dZdZdZddlZddlZddlZddlZddlZddlZddddddd d d d d Z d Z dGdZ dHdZ dIdZ ddlZdZgdZgdZdZdZdZdJdZdZdKdZdZdLdZdZdZdHd Zd!ZdHd"Zd#d$d%dZ ejBd d fd&Z"d'Z#Gd(d)Z$d*Z%Gd+d,ejLd-d.Z'da(d/Z)d0Z*d1Z+d2Z,d3Z-d4Z.d5Z/iZ0dMd6Z1d7Z2d8Z3d9Z4d:Z5d;Z6d<Z7d=Z8iZ9dNd>Z:d?Z;dae?dBk(r^dCejvxsdDejvZAdEejvxrdFejvZBeCe:eBeAejdyy#e$rdZY(wxYw)Oa7 This module tries to retrieve as much platform-identifying data as possible. It makes this information available via function APIs. If called from the command line, it prints the platform information concatenated as single string to stdout. The output format is usable as part of a filename. a Copyright (c) 1999-2000, Marc-Andre Lemburg; mailto:mal@lemburg.com Copyright (c) 2000-2010, eGenix.com Software GmbH; mailto:info@egenix.com Permission to use, copy, modify, and distribute this software and its documentation for any purpose and without fee or royalty is hereby granted, provided that the above copyright notice appear in all copies and that both that copyright notice and this permission notice appear in supporting documentation or portions thereof, including modifications, that you make. EGENIX.COM SOFTWARE GMBH DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE ! z1.0.8N (2) devalphaabetabcRCrcplpctjd}g}|j|D])}|dvs t|d}d}|j||f+|S#t$rt j |d}Y8wxYw)Nz([0-9]+|[._+-])z._+-rdr)recompilesplitint ValueError _ver_stagesgetextend)version component_reresultvts /usr/lib/python3.12/platform.py_comparable_versionr#s::01L F    (" F? *2J MM1a& !" M *OOAq) *sAA98A9cp|sX tjd}|jd}t|dk(r t |S tj}|s||fStjdtj}t}tjj|}t!|d5}|j#|} d} | t| kr*d| vsd | vr|j%| | } nd } | r| j't| k(r7|j#|} | r!| t)| t| d z d | z} d} ~| sn| j+D cgc]} | | j-d n| c} \}}}}}}|r|sd }nY|r|dk7rd}|}nM||||kDr<|}n9|r7|dk7r2d }|r|r||||kDr|}|r|t| d |k7r||z}| j'} | t| kr*d d d ||fS#t t tf$rYwxYwcc} w#1swY||fSxYw)a Tries to determine the libc version that the file executable (which defaults to the Python interpreter) is linked against. Returns a tuple of strings (lib,version) which default to the given parameters in case the lookup fails. Note that the function has intimate knowledge of how different libc versions add symbols to the executable and thus is probably only usable for executables compiled using gcc. The file is read and scanned in chunks of chunksize bytes. CS_GNU_LIBC_VERSION)maxsplitsC(__libc_init)|(GLIBC_([0-9.]+))|(libc(_\w+)?\.so(?:\.(\d[0-9.]*))?)rbrslibcsGLIBCNilatin1libcglibc)osconfstrrlentupleAttributeErrorrOSErrorsys executablerrASCIIr#pathrealpathopenreadsearchendmaxgroupsdecode)r5libr chunksizeverparts libc_searchVfbinaryposmchunkslibcinitr- glibcversionsothreads soversions r"libc_verrQsd  **23CIIqI)E5zQU|# ^^ < **BDF88 MK A!!*-J j$ "1 "CK& H$6&&vs33v;.y)#CS[4-?$@$ABUJFCE%'(m":E% AHe\2w '>!C*G|_qz1*G'> C 'Qy\AgJ5N"+7CL=>#:g#E")G"3%%'C?CK"F <q G4   JE%!"F <s1?H 0B'H)H$3BH) H! H!$H))H5c |jd}|r|j| ttttt |}dj|dd}|S#t $r|}Y#wxYw)z Normalize the version and build strings and return a single version string using the format major.minor.build (or patchlevel). .N)rappendlistmapstrrrjoin)rbuildlstringss r" _norm_versionr]sm  cA  s3C ,-hhwr{#G N s'A## A10A1win32win16dosc tj|vr|||fSddl}dD]/} |j||j|jddd}n|||fStjd}|j}|j|} | 9| j\}}}|dd k(r|dd}|dd k(r|dd}t|}|||fS#t |j f$r }Yd}~d}~wwxYw) a+ Tries to figure out the OS version used and returns a tuple (system, release, version). It uses the "ver" shell command for this which is known to exists on Windows, DOS. XXX Others too ? In case this fails, the given parameters are used as defaults. rN)rBzcommand /c verz cmd /c verTlocale)stdinstderrtextencodingshellz'(?:([\w ]+) ([\w.]+) .*\[.* ([\d.]+)\])rS) r4platform subprocess check_outputDEVNULLr3CalledProcessErrorrrstripmatchr>r]) systemreleasersupported_platformsrkcmdinfowhy ver_outputrIs r" _syscmd_verrxs+ ||..w''6( **31;1C1C2<2D2D044<15 +7D (w''-.J ::K|]}|jdyw)=N) partition).0is r" z_wmi_query..Js51akk#&5srr)c3(K|] }| ywN)rk dict_datas r"rz_wmi_query..Ls+ ! +s)_wmi exec_queryformatrYr)tablekeysdata split_datarrs @r" _wmi_queryrAs)$  299 HHTN    5; 65 )34AQqT1Q4Z4 +d++5sA8ctd)Nz not supported)r3)rs r"rr>s o&&) )rr'rpost11))rriU11)r10)rrTrz8.1)rr)r8)rr'r7)rrrVista))r)iXP64)rr)rXPMedia))rr'rXP)rrr2000) )rpost2022Server))rri|O 2022Server))rricE 2019Server)r 2016Server)r 2012ServerR2)r 2012Server)r 2008ServerR2)r 2008Server)r 2003Server)r 2000ServerctdvS)N)IoTUAP NanoServerWindowsCoreHeadless IoTEdgeOS) win32_editionrrr" win32_is_iotrjs ?Z ZZrc ddl} d}|j|j|5}|j |ddcdddS#t$rddl}YMwxYw#1swYnxYw y#t $rYywxYw#t$rYywxYw)Nr,SOFTWARE\Microsoft\Windows NT\CurrentVersion EditionId)winreg ImportError_winreg OpenKeyExHKEY_LOCAL_MACHINE QueryValueExr3)rcvkeykeys r"rrms  %   CE!!&";";UC @s**3 A A  A AA*)A*0B663C,+C,:DD21D27D<;F)< E  F) E  F)F.F  F FF F&%F&) F54F5cd}t|||\}}}}|rKttt|j d|rt nt }tfd|D|}||||fS)NFrSc34K|]\}}|ks |ywrr)rr r intversions r"rzwin32_ver..sBda!z/Bs )rr1rWrr_WIN32_CLIENT_RELEASES_WIN32_SERVER_RELEASESnext)rrrrrrreleasesrs @r" win32_verrshI%/e%D"GS%3sGMM#$678 -6)>"  b$1 ]]1 !"GKhhj  G,, K (( sA>B > B  B  Bc(t}||S|||fS)a< Get macOS version information and return it as tuple (release, versioninfo, machine) with versioninfo being a tuple (version, dev_stage, non_release_version). Entries which cannot be determined are set to the parameter values which default to ''. All tuple entries are strings. )r)rrrrrus r"mac_verrs% >D   K ((rc`ddlm} |j|}||S|S#t$r|cYSwxYw)Nr)System) java.langr getPropertyr2)namedefaultrvalues r" _java_getproprs= ""4( =N s --c. ddl}td|}td|}|\}}}td|}td|}td|}|||f}|\}} } td| } td |}td | } || | f}||||fS#t$r ||||fcYSwxYw) a] Version interface for Jython. Returns a tuple (release, vendor, vminfo, osinfo) with vminfo being a tuple (vm_name, vm_release, vm_vendor) and osinfo being a tuple (os_name, os_version, os_arch). Values which cannot be determined are set to the defaults given as parameters (which all default to ''). rNz java.vendorz java.versionz java.vm.namezjava.vm.vendorzjava.vm.versionz java.os.archz java.os.namezjava.os.version)rrr) rrvendorvminfoosinfojavavm_name vm_release vm_vendoros_name os_versionos_archs r"java_verr s/=& 1FNG4G%+"GZNG4G. :I0*=J j) +F#) GZNG4GNG4G0*=J j' )F FFF **! /../sBBBc|dk(r[|dkr|||fS|jd}|r3 t|d}|dz }t||d<dj|}|dkrd}n d}n|dvrd }|||fS#t$rY!wxYw) z Returns (system, release, version) aliased to common marketing names used for some systems. It also does some reordering of the information in some cases where it would otherwise cause confusion. SunOS5rSrrT6Solarisr_r`Windows)rrrXrYr)rqrrrr[rs r" system_aliasr!s S=7G+ + MM#   &AaD  5z!((1+ S=FF % % 7G ##'  sA,, A87A8cdjdtt|D}|jdd}|jdd}|jdd}|jdd}|jdd}|jd d}|jd d}|jd d}|jd d } |jdd}||k(rn|}|ddk(r|dd}|ddk(r|S)zq Helper to format the platform string in a filename compatible format e.g. "system-version-machine". -c3<K|]}|jywr)ro)rxs r"rz_platform..Qs=a =s _/\:;"()unknownr$z--riN)rYfilterr0replace)argsrjcleaneds r" _platformr$Ks xx=6#t+<==HS)HS)Hc*HS)HS)HS)HS)HS)H 2.H ""4- h    2,# CR= 2,#  Orcr ddl} |jS#t$r|cYSwxYw#t$r|cYSwxYw)z8 Helper to determine the node name of this machine. rN)socketr gethostnamer3)rr&s r"_noder(ksI!!##  s( %% 66ctjj|}tjj|rtjj tjj tjj |tj|}tjj|r|S)zT In case filepath is a symlink, follow it until a real file is reached. )r.r7abspathislinknormpathrYdirnamereadlink)filepaths r"_follow_symlinksr0zs| wwx(H ''.. "77## GGLL2BKK4I JL ''.. " OrcJtjdvr|S ddl}t |}t t jd} |jdd|g|j|}|s|S|jd S#t$r|cYSwxYw#t|jf$r|cYSwxYw) z Interface to the system's file command. The function uses the -b option of the file command to have it omit the filename in its output. Follow the symlinks. It returns default in case the command should fail. )rar_r`rNC)LC_ALLfilez-b)reenvzlatin-1) r4rjrkrr0dictr.environrlrmr3rnr?)targetrrkr5outputs r" _syscmd_filer:s ||00f %F rzz# &C((&$)?0:0B0B-0)2  == ###  Z22 3s#A7!B7 BBB"!B")r$ WindowsPE)r$r)r$MSDOSc|s&ddl}|jd}t|dzdz}|r t|d}nd}|sO|tj k(r>"8:L:NO O Ps1A  A cf ddl}|jdd\}}|dk\rdSdS#t$rYywxYw)NrzSYI$_CPUrRVAX)vms_libgetsyir)rncsid cpu_numbers r" get_OpenVMSz_Processor.get_OpenVMS(sG ;  '~~j!< D*(C/7 :U :    s $ 00c ddl} |jddg|jddj S#t$rYywxYw#t |j f$rYywxYw)z) Fall back to `uname -p` rNrz-pTutf8)rerfrg)rkrrlrmror3rn)rks r"r`z_Processor.from_subprocess1sx   **$!)) + eg    667   s 6.A AAAAN)__name__ __module__ __qualname__ classmethodrrjrrr`rrr"r]r]s#0;rr]c|dk(rdS|S)Nrr$r)vals r"_unknown_as_blankr{Ds !2*s*rcleZdZdZdZej dZfdZe dZ dZ dZ dZ xZS) uname_resultz A uname_result that's largely compatible with a simple namedtuple except that 'processor' is resolved late and cached to avoid calling "uname" except when needed. )rqnoderrrr processorc<ttjSr)r{r]rselfs r"rzuname_result.processorXs !122rc^tjt| |jfSr) itertoolschainsuper__iter__r)r __class__s r"rzuname_result.__iter__\s) G   ^^   rct|jdz }|j|g|}t||dzk7rd|dt|}t||S)Nr'z Expected z arguments, got )r0_fields__new__ TypeError)raiterable num_fieldsrmsgs r"_makezuname_result._makebsb%) S,8, v;*q. (j\)9#f+GCC.  rct||Sr)r1)rrs r" __getitem__zuname_result.__getitem__lsT{3rc<ttt|Sr)r0r1iterrs r"__len__zuname_result.__len__os5d$%%rcVtt|dt|jdz fS)Nr')r}r1r0rrs r" __reduce__zuname_result.__reduce__rs'U4[)?#dll*;a*?@@@r)rurvrw__doc__r functoolscached_propertyrrrxrrrr __classcell__)rs@r"r}r}JsQ OG33  &Arr}uname_result_basez#system node release version machinec~ttS tjx\}}}}}}t|s|dk(rt\}}}}|xs t}|r|s0t|\}}}|dk(rd}n|dk(r|dk(rd}d|dd k(rd }nd}|d vr|s |dk(rd }nd }d}n.|dddk(r&t\}}} } d}dj| }|s|}|dk(r |r|dk(r|}d}|dk(r |dk(rd}d }|||||f} ttt| atS#t$r&tj }t }dx}x}}d}YwxYw)an Fairly portable uname interface. Returns a tuple of strings (system, node, release, version, machine, processor) identifying the underlying platform. Note that unlike the os.uname function this also returns possible processor information as an additional tuple entry. Entries which cannot be determined are set to ''. Nr$rr_zMicrosoft Windowsr Microsoftz6.0rTrrrA16bitrrJavarfOpenVMSr) _uname_cacher.rr2r4rjr(anyrr[rxr rYr}rWr{) rqr~rrrrinfosrrrrrvalss r"rrys:<((*D/gw% u: W +4; (GWc55!3!5GG'26': $FGW,,";&7i+? #GBQK'%G G ' 'W$%G%GF BQZ6 !.6j +GVVVFii'G 'S.GGI!5 4'7 2D%6!=>L C w&((('G sD +D<;D<c*tjS)z Returns the system/OS name, e.g. 'Linux', 'Windows' or 'Java'. An empty string is returned if the value cannot be determined. )rrqrrr"rqrqs 7>>rc*tjS)z Returns the computer's network name (which may not be fully qualified) An empty string is returned if the value cannot be determined. )rr~rrr"r~r~s 7<<rc*tjS)z Returns the system's release, e.g. '2.2.0' or 'NT' An empty string is returned if the value cannot be determined. )rrrrrr"rrrr 7??rc*tjS)z Returns the system's release version, e.g. '#3 on degas' An empty string is returned if the value cannot be determined. )rrrrr"rrrrc*tjS)zt Returns the machine type, e.g. 'i386' An empty string is returned if the value cannot be determined. )rrrrr"rrrrc*tjS)a Returns the (true) processor name, e.g. 'amdk6' An empty string is returned if the value cannot be determined. Note that many platforms do not provide this information or simply return the same value as for machine(), e.g. NetBSD does this. )rrrrr"rrs 7  rc0|tj}tj|d}||St j dtj }tjjdrWd}|j|}|tdt|z|j\}}}}} |d}tj} nd|vrYt j d} d}| j|}|td t|z|j\}}}}d} nQ|j|}|td t|z|j\}}}}} d }|d}n |r|d z|z}ttd rtj\} } } n)ttdrtj\} } } nd} d} |j!d}t#|dk(r"|j%ddj'|}||| | ||| f}|t|<|S)a Returns a parsed version of Python's sys.version as tuple (name, version, branch, revision, buildno, builddate, compiler) referring to the Python implementation name, version, branch, revision, build number, build date/time as string and the compiler identification string. Note that unlike the Python sys.version, the returned value for the Python version will always include the patchlevel (it defaults to '.0'). The function returns empty strings for tuple entries that cannot be determined. sys_version may be given to parse an alternative version string, e.g. if the version was read from a different Python interpreter. NzL([\w.+]+)\s*\(#?([^,]+)(?:,\s*([\w ]*)(?:,\s*([\w :]*))?)?\)\s*\[([^\]]+)\]?rJythonz&failed to parse Jython sys.version: %sr$PyPyzE([\w.+]+)\s*\(#?([^,]+),\s*([\w ]+),\s*([\w :]+)\)\s*\[PyPy [^\]]+\]?z$failed to parse PyPy sys.version: %sz'failed to parse CPython sys.version: %sCPythonr_git _mercurialrSr)r)r4r_sys_version_cacherrrr6rj startswithrprreprr>hasattrrrrr0rUrY) sys_versionrsys_version_parserrrprbuildno builddate buildtimercompilerpypy_sys_version_parserbranchrevisionr[s r" _sys_versionrs:*kk  # #K 6F   (( $ ||v&"((5 =8[!"# #5:LLN1)Y  I<< ; "$** #! '--k: =C!+./0 016.)Y#((5 =9[!"# #lln 9)Y  I !C)3IsF!hh68 l #!nn68  cA 1v{  ((1+GVXw 8 LF&,{# MrctdS)a Returns a string identifying the Python implementation. Currently, the following implementations are identified: 'CPython' (C implementation of Python), 'Jython' (Java implementation of Python), 'PyPy' (Python implementation of Python). rrrrr"python_implementationrrs >! rctdS)z Returns the Python version as string 'major.minor.patchlevel' Note that unlike the Python sys.version, the returned value will always include the patchlevel (it defaults to 0). r'rrrr"python_versionr~s >! rcLttdjdS)z Returns the Python version as tuple (major, minor, patchlevel) of strings. Note that unlike the Python sys.version, the returned value will always include the patchlevel (it defaults to 0). r'rS)r1rrrrr"python_version_tuplers! "((- ..rctdS)z Returns a string identifying the Python implementation branch. For CPython this is the SCM branch from which the Python binary was built. If not available, an empty string is returned. r)rrrr" python_branchrs >! rctdS)z Returns a string identifying the Python implementation revision. For CPython this is the SCM revision from which the Python binary was built. If not available, an empty string is returned. rTrrrr"python_revisionrs >! rctddS)zh Returns a tuple (buildno, builddate) stating the Python build number and date as strings. rrrrrr" python_buildrs >!A rctdS)zS Returns a string identifying the compiler used for compiling Python. rrrrr"python_compilerrs >! rc ztj||fd}||St\}}}}}}||k(rd}|rt|||\}}}|dk(rt d} | rd}| }|dk(r.t |\} } } } |r t ||}nt |||| }n|dk(r!t\}}t ||||d||z}nw|d k(r7t\}}}\}}}|s|st |||}nMt |||d |||}n;|r t ||}n,ttj\}}t ||||||}|t||f<|S) a Returns a single string identifying the underlying platform with as much useful information as possible (but no more :). The output is intended to be human readable rather than machine parseable. It may look different on different platforms and this is intended. If "aliased" is true, the function will use aliases for various platforms that report system names which differ from their common names, e.g. SunOS will be reported as Solaris. The system_alias() function is used to implement this. Setting terse to true causes the function to return only the absolute minimum information needed to identify the platform. Nr$DarwinrmacOSrLinuxwithron) _platform_cacherrrrrr$rQr rMr4r5)aliasedterserrqr~rrrrr macos_releaserelversrrrjlibcname libcversionrr rrrrrIrJs r"rjrjs& '5!14 8F  :?6FD'7GY) #/#I   ! F#G  )' 2T3  1H '3?H 7  ( +VWgy#%k13 6 7?z41f4w G  ':H '!%!(*g?H  1H(8MD' '!*D';H)1OWe$% Or)z/etc/os-releasez/usr/lib/os-releasecdddd}tjd}tjd}|D]I}|j|}||jd|j d||j d<K|S) Nrlinux)NAMEID PRETTY_NAMEzA^(?P[a-zA-Z0-9_]+)=(?P["']?)(?P.*)(?P=quote)$z\\([\\\$\"\'`])z\1rr)rrrpsubgroup)linesruos_release_lineos_release_unescapelinemos r"_parse_os_releasers DjjMO**%78  " "4 ( >%8%<%<rxx(&D&! " Krc\ted}tD]8} t|d5}t|adddtjSt |ddj ttjS#1swYUxYw#t$r}|j }Yd}~d}~wwxYw)zKReturn operation system identification from freedesktop.org os-release Nzutf-8)rgzUnable to read files rf)_os_release_cache_os_release_candidatesr9rr3errnorYcopy)r candidaterFes r"freedesktop_os_releaser/s  / I )g6=!(9!(<%=  ! ! ## ' 2H(I'JK   ! ! ##==  s- B  BB B B  B+ B&&B+__main__rz--terse nonaliasedz --nonaliased)Nr$r$i@)r$)r$r$r$r^)r$r$r$r$)r$rr$)r$r$rrr)FF)Er __copyright__ __version__ collectionsr.rr4rrrr#rQr]rxrrrrrrrrrrrrr rr$r(r0r:rHr5rMr[r]r{ namedtupler}rrrqr~rrrrrrrrrrrrrrrrjrrrrruargvrrprintexitrrr"rs/r *    b R B C    N` 202#<4$l, ,  [$<*| (),)& +F&$T@   $N    NNRIX8''T+ )AK-/)AX Ur `D  /  H\D6$2 z  9I$9E388+NNchh4NG (7E "# CHHQK W '''sE""E.-E.