%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /usr/local/lib/python3.8/__pycache__/
Upload File :
Create Path :
Current File : //usr/local/lib/python3.8/__pycache__/platform.cpython-38.pyc

U

na@sldZdZdZddlZddlZddlZddlZddddddd	d	d
d
d
ZedZ	d
dZ
edejZdwddZ
dxddZedZdyddZddddddd d!d"d#d$d%Zdd&d'd(d)d*d+Zd,d-Zd.d/Zdzd0d1Zd2d3Zd{d5d6Zd7d8Zd|d9d:Zd;d<Zd=d>Zd}d?d@ZdAdBZd~dCdDZddEdFZdGdHdIdZ ej!ddfdJdKZ"e#dLdMZ$da%dNdOZ&dPdQZ'dRdSZ(dTdUZ)dVdWZ*dXdYZ+dZd[Z,ed\ejZ-ed]ejZ.ed^Z/ed_Z0iZ1dd`daZ2dbdcZ3dddeZ4dfdgZ5dhdiZ6djdkZ7dldmZ8dndoZ9iZ:ddpdqZ;e<drkrhdsej=kp8dtej=kZ>duej=koNdvej=kZ?e@e;e?e>eAddS)a8 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 useable 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)
devalphaabetabcZRCrcplpz([0-9]+|[._+-])c	Csbg}t|D]N}|dkrzt|d}d}Wn tk
rLt|d}YnX|||fq|S)Nz._+-rdr)
_component_resplitint
ValueError_ver_stagesgetextend)versionresultvtr$/usr/local/lib/python3.8/platform.py_comparable_versions
rsC(__libc_init)|(GLIBC_([0-9.]+))|(libc(_\w+)?\.so(?:\.(\d[0-9.]*))?)@c
Cs|dkrZz0td}|jdd}t|dkr6t|WSWntttfk
rRYnXtj	}t
}ttjdrvtj
|}t|d`}||}d}	|	t|krd	|ksd
|krt||	}
nd}
|
r|
t|kr||}|r|t|	t|dd|}d}	q|
sqdd
|
D\}}
}}}}|rF|sFd}n|
rx|dkr`d}|}n||||kr|}n\|r|dkrd}|r|r||||kr|}|r|t|d|kr||}|
}	qW5QRX||fS)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 useable for executables compiled using gcc.

        The file is read and scanned in chunks of chunksize bytes.

    NCS_GNU_LIBC_VERSION)maxsplitrealpathrbrslibcsGLIBCicSs"g|]}|dk	r|dn|qS)Nlatin1)decode).0srrr
<listcomp>szlibc_ver.<locals>.<listcomp>libcglibc)osconfstrrlentupleAttributeErrorrOSErrorsys
executablerhasattrpathr&openread_libc_searchsearchendmaxgroups)r6libr	chunksizeverpartsVfbinaryposmchunkZlibcinitr.ZglibcversionZsothreadsZ	soversionrrrlibc_vers^




rKcCs`|d}|r||zttttt|}Wntk
rH|}YnXd|dd}|S)z Normalize the version and build strings and return a single
        version string using the format major.minor.build (or patchlevel).
    .N)rappendlistmapstrrrjoin)rbuildlstringsrrr
_norm_versions


rVz'(?:([\w ]+) ([\w.]+) .*\[.* ([\d.]+)\])win32win16dosc	Cstj|kr|||fSddl}dD]R}z|j||jddd}Wn0t|jfk
rl}zWYq W5d}~XYq Xq~q |||fS|}t	|}|dk	r|
\}}}|ddkr|dd}|ddkr|dd}t|}|||fS)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 verT)stderrtextshellrL)r5platform
subprocesscheck_outputDEVNULLr4CalledProcessErrorstrip_ver_outputmatchr?rV)	systemreleaserZsupported_platformsr`cmdinfowhyrHrrr_syscmd_vers0




rlZ2000ZXPZ
2003ServerZpost2003Vista78z8.1zpost8.1Z10Zpost10))r)rpr#rpr%)rpNrrsr#rsr%rsrMrsN)rr)rNZ
2008ServerZ2008ServerR2Z
2012ServerZ2012ServerR2Zpost2012ServerR2)rqrrrtrurvrwcCs
tdkS)N)ZIoTUAPZ
NanoServerZWindowsCoreHeadlessZ	IoTEdgeOS)
win32_editionrrrrwin32_is_iotOsryc
Csz.zddl}Wntk
r*ddl}YnXWntk
rBYnTXz<d}||j| }||ddW5QRWSQRXWntk
rYnXdS)Nr,SOFTWARE\Microsoft\Windows NT\CurrentVersionZ	EditionId)winregImportError_winreg	OpenKeyExHKEY_LOCAL_MACHINEQueryValueExr4)r{cvkeykeyrrrrxRs(rxc	Cszddlm}Wn tk
r0||||fYSX|}z tttdd\}}}Wn,tk
r|jpx|dd\}}}YnXd	|||}t
||fpt
|dfp|}|dd||fkrzd	|j}Wn8t
k
r|ddd	krd
|dd}YnXt|dddkrJt||fpHt|dfpH|}z0zddl}	Wntk
rvddl}	YnXWntk
rYnLXz2d}
|	|	j|
}|	|d
d}W5QRXWntk
rYnX||||fS)Nr)getwindowsversionr%rLrMz{0}.{1}.{2}zSP{}
z
Service Pack ZSPZproduct_typerzZCurrentType)r5rr|rPrrlrrZplatform_versionformat_WIN32_CLIENT_RELEASESrZservice_pack_majorr3getattr_WIN32_SERVER_RELEASESr{r}r~rrr4)rhrcsdptyperZwinvermajorminorrSr{rrrrr	win32_verdsR rc	Csd}tj|sdSzddl}Wntk
r6YdSXt|d}||}W5QRX|d}d}tj}|dkrzd}|||fS)Nz0/System/Library/CoreServices/SystemVersion.plistrr'ZProductVersionr r r )ZppczPower MacintoshZPowerPC)	r/r8existsplistlibr|r9loadunamemachine)fnrrErrhversioninforrrr_mac_ver_xmls
rrcCst}|dk	r|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.
    N)r)rhrrrjrrrmac_versrcCsHddlm}z||}|dkr&|WS|WStk
rB|YSXdS)Nr)System)	java.langrZgetPropertyr3)namedefaultrvaluerrr
_java_getprops
rcCszddl}Wn tk
r,||||fYSXtd|}td|}|\}}}td|}td|}td|}|||f}|\}}	}
td|
}
td	|}td
|	}	||	|
f}||||fS)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 '').

    rNzjava.vendorzjava.versionzjava.vm.namezjava.vm.vendorzjava.vm.versionzjava.os.archzjava.os.namezjava.os.version)rr|r)rhvendorvminfoosinfojavaZvm_nameZ
vm_releaseZ	vm_vendoros_name
os_versionos_archrrrjava_vers"












rcCs|dkr|dkr|||fS|d}|rlzt|d}Wntk
rLYn X|d}t||d<d|}|dkrzd}qd}n,|dkrd	}|r|d
}qd}n|dkrd
}|||fS)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.

    ZSunOS5rLrrM6ZSolarisZIRIX64ZIRIXz (64bit)64bitrXrYWindows)rrrrQrR)rgrhrrTrrrrsystem_aliass.	



rcGsdddtt|D}|dd}|dd}|dd}|dd}|d	d}|d
d}|dd}|dd}|d
d}|dd}||krq|}q|ddkr|dd}q|S)zq Helper to format the platform string in a filename
        compatible format e.g. "system-version-machine".
    -css|]}|VqdS)N)rd)r*xrrr	<genexpr>(sz_platform.<locals>.<genexpr> _/\:;"()unknownr z--r^N)rRfilterr1replace)argsr_Zcleanedrrr	_platform"s"rcCsNzddl}Wntk
r$|YSXz
|WStk
rH|YSXdS)z8 Helper to determine the node name of this machine.
    rN)socketr|gethostnamer4)rrrrr_nodeBs

rcCsBtj|}tj|r>tjtjtj|t|}q|S)zT In case filepath is a symlink, follow it until a
        real file is reached.
    )r/r8abspathislinknormpathrRdirnamereadlink)filepathrrr_follow_symlinksQsrc	Cs\tjdkr|Sddl}z|jd|f|jdd}Wnt|jfk
rN|YSX|pZ|S)z. Interface to the system's uname command.
    rZrXrYrNrT)r[r\)r5r_r`rarbr4rcrd)optionrr`outputrrr
_syscmd_uname\s



rc	Csztjdkr|Sddl}t|}ttjdd}z|jdd|g|j|d}Wnt	|j
fk
rf|YSX|sp|S|d	S)
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.

    rrNC)LC_ALLfilez-b)r[envzlatin-1)r5r_r`rdictr/environrarbr4rcr))targetrr`rrrrr_syscmd_filems	


r)r 	WindowsPE)r r)r MSDOScCs|s&ddl}|d}t|dd}|r6t|d}nd}|sx|tjkrxtjtkrpttj\}}|rh|}|rp|}||fSd|krd|kr||fSd	|krd
}nd|krd}nd
|krd}d|krd}n8d|krd|krd}qd}nd|krd}nd|krd}n||fS)a Queries the given executable (defaults to the Python interpreter
        binary) for various architecture information.

        Returns a tuple (bits, linkage) which contains information about
        the bit architecture and the linkage format used for the
        executable. Both values are returned as strings.

        Values that cannot be determined are returned as given by the
        parameter presets. If bits is given as '', the sizeof(pointer)
        (or sizeof(long) on Python version < 1.5.2) is used as
        indicator for the supported pointer size.

        The function relies on the system's "file" command to do the
        actual work. This is available on most if not all Unix
        platforms. On some non-Unix platforms where the "file" command
        does not exist and the executable is set to the Python interpreter
        binary defaults from _default_architecture are used.

    rNPbitr r6z
shared objectz32-bit32bitZN32Zn32bitz64-bitrZELFZPErrZCOFFzMS-DOSr)structcalcsizerQrr5r6r__default_architecture)r6bitslinkagersizeZfileoutrrTrrrarchitecturesH

runame_resultz-system node release version machine processorcCsd}tdk	rtSd}zt\}}}}}Wntk
rBd}YnX|sbttd|||||fs|r~tj}d}d}t}d}d}|dkrt	\}}}}	|r|rd}|sdtj
krtj
dd}ntj
dd}|stj
d|}|r:t|\}}}|d	krd
}n4|dkr:|d
kr:d
}d|dd
kr6d}nd}|dkrd|s^|dkrZd}nd}d
}n8|dddkrt
\}}
}}d}d|}|s|
}|dkr|r|dkr|}d}zddl}
Wntk
rYn&X|
dd\}}|dkrd}nd}|stdd}|dkr$d}|dkr2d}|dkr@d}|dkrNd}|dkr\d}|dkrjd}|dkr|d
krd
}d}t||||||atS)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 ''.

    rNr r#rXZPROCESSOR_ARCHITEW6432ZPROCESSOR_ARCHITECTUREZPROCESSOR_IDENTIFIERzMicrosoft WindowsrZ	Microsoftz6.0rMrmrrZ16bitrJavaz, ZOpenVMS0zSYI$_CPUZAlphaZVAXz-pr)_uname_cacher/rr3rOrr5r_rrrrrlrrRvms_libr|Zgetsyirr)Zno_os_uname	processorrgnoderhrrZuse_syscmd_verrrrrrrZcsidZ
cpu_numberrrrrs
















rcCstjS)z Returns the system/OS name, e.g. 'Linux', 'Windows' or 'Java'.

        An empty string is returned if the value cannot be determined.

    )rrgrrrrrgusrgcCstjS)z Returns the computer's network name (which may not be fully
        qualified)

        An empty string is returned if the value cannot be determined.

    )rrrrrrr~srcCstjS)z Returns the system's release, e.g. '2.2.0' or 'NT'

        An empty string is returned if the value cannot be determined.

    )rrhrrrrrhsrhcCstjS)z Returns the system's release version, e.g. '#3 on degas'

        An empty string is returned if the value cannot be determined.

    )rrrrrrrsrcCstjS)zt Returns the machine type, e.g. 'i386'

        An empty string is returned if the value cannot be determined.

    )rrrrrrrsrcCstjS)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.

    )rrrrrrrs
rzL([\w.+]+)\s*\(#?([^,]+)(?:,\s*([\w ]*)(?:,\s*([\w :]*))?)?\)\s*\[([^\]]+)\]?z;IronPython\s*([\d\.]+)(?: \(([\d\.]+)\))? on (.NET [\d\.]+)zU([\d.]+)\s*\(IronPython\s*[\d.]+\s*\(([\d.]+)\) on ([\w.]+ [\d.]+(?: \(\d+-bit\))?)\)zE([\w.+]+)\s*\(#?([^,]+),\s*([\w ]+),\s*([\w :]+)\)\s*\[PyPy [^\]]+\]?cCs|dkrtj}t|d}|dk	r&|Sd|krd}|drHt|}n
t|}|dkrjtdt	||
\}}}d}d}ntjdrd}t|}|dkrtdt	||
\}}}}	}
|dkrd}tj}nd|kr"d}t
|}|dkrtd	t	||
\}}}}	d}n\t|}|dkrFtd
t	||
\}}}}	}d}|dkrld}n|	r~|d|	}ttd
rtj\}
}}n"ttdrtj\}
}}nd}d}|d}
t|
dkr|
dd|
}|||||||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.

    NZ
IronPythonz*failed to parse IronPython sys.version: %sr rZJythonz&failed to parse Jython sys.version: %sZPyPyz$failed to parse PyPy sys.version: %sz'failed to parse CPython sys.version: %sZCPythonr_git
_mercurialrLr%r)r5r_sys_version_cacher
startswith_ironpython_sys_version_parserrf _ironpython26_sys_version_parserrreprr?r__sys_version_parser_pypy_sys_version_parserr7rrrr1rNrR)sys_versionrrrfrZalt_versionZcompilerZbuildnoZ	builddateZ	buildtimerbranchZrevisionrTrrr_sys_versions











rcCs
tdS)aR Returns a string identifying the Python implementation.

        Currently, the following implementations are identified:
          'CPython' (C implementation of Python),
          'IronPython' (.NET implementation of Python),
          'Jython' (Java implementation of Python),
          'PyPy' (Python implementation of Python).

    rrrrrrpython_implementation5srcCs
tdS)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#rrrrrpython_versionBsrcCsttddS)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#rL)r2rrrrrrpython_version_tupleLs	rcCs
tdS)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%rrrrr
python_branchWsrcCs
tdS)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.

    rMrrrrrpython_revisionesrcCstddS)zh Returns a tuple (buildno, builddate) stating the Python
        build number and date as strings.

    rrsrrrrrpython_buildrsrcCs
tdS)zS Returns a string identifying the compiler used for compiling
        Python.

    rsrrrrrpython_compilerzsrcCsbt||fd}|dk	r|St\}}}}}}||kr:d}|rPt|||\}}}|dkrntd}	|	rnd}|	}|dkrt|\}
}}}
|rt||}nt||||}n|dkrttj	\}}t||||d||}n~|d	kr t
\}}}\}}}|s|s
t|||}nt|||d
|||}n2|r2t||}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 ZDarwinrZmacOSr)ZLinuxwithrZon)_platform_cacherrrrrrrKr5r6rr)aliasedterserrgrrhrrrZ
macos_releaseZrelZversrrr_ZlibcnameZlibcversionrrrrrrrrrrrr_sX



r___main__rz--terseZ
nonaliasedz--nonaliased)Nr r r!)r )r r r rW)r r r r )r rr )r r rr)r )r )r )N)rr)B__doc__Z
__copyright____version__collectionsr/rer5rcompilerrASCIIr;rKrVrerlrrryrxrrrrrrrrrrrrr6r
namedtuplerrrrgrrhrrrrrrrrrrrrrrrrrr___name__argvrrprintexitrrrr<module>sY


G



1

3

#4 


$P	
			
h




L


Zerion Mini Shell 1.0