MINI MINI MANI MO

Path : /lib64/python3.6/__pycache__/
File Upload :
Current File : //lib64/python3.6/__pycache__/platform.cpython-36.opt-1.pyc

3


 \W@sBdZdZdZddlZddlZddlZddlZddlZddlZy
ej	Z
Wn(ek
rnejdkrfdZ
nd	Z
YnXd
Z
dddd
d
dddddd
ZejdZddZejdejZejdddfddZddZejdejZejdejZejdejZdZd.d/Zddded0fd1d2Zd3d4Zdddefd5d6Zdd8d9Zdd:d;Z ejd<Z!dd=d>Z"dd@ddAddCddDddFddGddHddJddKddLddMiZ#ddCddNddOddPddQddRiZ$ddSdTZ%dUdVZ&ddWdXZ'dYdZZ(dd[d\Z)d]d^Z*d_d`Z+ddadbZ,dcddZ-ddedfZ.ddgdhZ/ddddlZ0ejddfdmdnZ1ej2dodpZ3da4dqdrZ5dsdtZ6dudvZ7dwdxZ8dydzZ9d{d|Z:d}d~Z;ejdejZ<ejdejZ=ejdZ>ejdZ?iZ@dddZAddZBddZCddZDddZEddZFddZGddZHiZIdddZeJdkr>dejKkpdejKkZLdejKko$dejKkZMeNeeMeLejOddS)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.8Ndoswin32win16ZNULz	/dev/nullz/etc
(2)
ZdevZalphaaZbetabcZRCrcplpz([0-9]+|[._+-])cCsfg}x\tj|D]N}|dkryt|d}d}Wn tk
rNtj|d}YnX|j||fqW|S)Nz._+-rdr)
_component_resplitint
ValueError_ver_stagesgetextend)versionresultvtr /usr/lib64/python3.6/platform.py_comparable_versions
rsC(__libc_init)|(GLIBC_([0-9.]+))|(libc(_\w+)?\.so(?:\.(\d[0-9.]*))?)i@c
Cst}ttjdrtjj|}t|d`}|j|}d}xH|t|krd|ksZd|krhtj	||}nd}|s|j
t|kr|j|}	|	r|t|t|dd|	}d}q<|sPdd	|jD\}
}}}
}}|
r|rd
}n|r|dkrd}|}n||||krx|}n^|
rx|dkrxd
}|rR|sN||||krR|}|rx|t|d|krx||}|j
}q<WWdQRX||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.

    realpathrbrslibcsGLIBCNicSs"g|]}|dk	r|jdn|qS)Nlatin1)decode).0srrr
<listcomp>szlibc_ver.<locals>.<listcomp>Zlibcglibc)
rhasattrospathr!openreadlen_libc_searchsearchendmaxgroups)
executablelibrZ	chunksizeVfZbinaryposmchunkZlibcinitr(ZglibcversionZsoZthreadsZ	soversionrrrlibc_versJ




 r;cCsptjjdrd}td`}xX|D]P}|j}t|dkr |\}}nq |dkrV|j}q |dkr |jd}|d}q WWdQRX|||fStjjdrtdD}x<|D]4}|jd}	t|	dkr|	d	d
krd
|	d|fSqWWdQRXtjjdrftjd}
x:t	t|
dddD]"}|
|dd
dkr|
|=qW|
rf|
j
d}|
dd
d}|||fS|||fS)z Tries some special tricks to get the distribution
        information in case the default method fails.

        Currently supports older SuSE Linux, Caldera OpenLinux and
        Slackware Linux distributions.

    z/var/adm/inst-log/infoSuSEZMIN_DIST_VERSIONZ
DIST_IDENT-Nz/etc/.installedrZ	OpenLinuxz/usr/lib/setupzslack-version-	slackwarerBrB)r*r+existsr,rr.stripisdirlistdirrangesort)distnameridr7lineZtvtagvaluevaluesZpkgZverfilesnrrr_dist_try_harders>	










rPz(\w+)[-_](release|version)z'(.+) release ([\d.]+)[^(]*(?:\((.+)\))?z1([^0-9]+)(?: release )?([\d.]+)[^(]*(?:\((.+)\))?r<debianfedoraredhatcentosmandrakemandrivarocksrA	yellowdoggentooUnitedLinux
turbolinuxarchmageiacCszd}d}tj|}|dk	r&t|jStj|}|dk	rDt|jS|jj}|rp|d}t|dkrp|d}d||fS)Nr rr?)_lsb_release_versionmatchtupler3_release_versionrDrr.)	firstlinerrJr9lrrr_parse_release_file0s

rdr?cCs(ddl}|jdtddt|||||S)NrzFdist() and linux_distribution() functions are deprecated in Python 3.5r=)
stacklevel)warningswarnPendingDeprecationWarning_linux_distribution)rIrrJsupported_distsfull_distribution_namerfrrrlinux_distributionKs


rlcCsytjt}Wntk
r(|||fSX|jxD|D]0}tj|}|dk	r8|j\}}	||kr8|}Pq8Wt|||St	tj
jt|dddd}
|
j}WdQRXt
|\}}}
|r|r|}|r|}|
r|
}|||fS)a Tries to determine the name of the Linux OS distribution name.

        The function first looks for a distribution release file in
        /etc and then reverts to _dist_try_harder() in case no
        suitable files are found.

        supported_dists may be given to define the set of Linux
        distributions to look for. It defaults to a list of currently
        supported Linux distributions identified by their release file
        name.

        If full_distribution_name is true (default), the full
        distribution read from the OS is returned. Otherwise the short
        name taken from supported_dists is used.

        Returns a tuple (distname, version, id) which default to the
        args given as parameters.

    Nrzutf-8surrogateescape)encodingerrors)r*rF_UNIXCONFDIROSErrorrH_release_filenamer_r3rPr,r+joinreadlinerd)rIrrJrjrkZetcfiler9Z	_distnameZdummyr7rbZ_versionZ_idrrrriUs0

ricCs*ddl}|jdtddt||||ddS)aS Tries to determine the name of the Linux OS distribution name.

        The function first looks for a distribution release file in
        /etc and then reverts to _dist_try_harder() in case no
        suitable files are found.

        Returns a tuple (distname, version, id) which default to the
        args given as parameters.

    rNzFdist() and linux_distribution() functions are deprecated in Python 3.5r=)re)rjrk)rfrgrhri)rIrrJrjrfrrrdists
rwrmcCs&ddl}|jdtddtj|||S)z! Portable popen() interface.
    rNzuse os.popen insteadr=)re)rfrgDeprecationWarningr*popen)cmdmodebufsizerfrrrrysrycCsd|jd}|r|j|ytt|}Wntk
r>|}YnXttt|}dj|dd}|S)z Normalize the version and build strings and return a single
        version string using the format major.minor.build (or patchlevel).
    .N)rappendmaprrliststrrt)rbuildrcZintsZstringsrrr
_norm_versions


rz'(?:([\w ]+) ([\w.]+) .*\[.* ([\d.]+)\])c	Cstj|kr|||fSxddD]R}y&tj|}|j}|jrBtdWn$tk
rh}zwWYdd}~XqXPqW|||fS|j}tj	|}|dk	r|j
\}}}|d	dkr|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.

    vercommand /c ver
cmd /c verzcommand failedNr?r})rrrrBrBrBrB)sysplatformr*ryr-closerrrD_ver_outputr_r3r)	systemreleaserZsupported_platformsrzpipeinfoZwhyr9rrr_syscmd_vers,





rZ2000ZXPr=Z
2003ServerZpost2003Vista78r~z8.1zpost8.1Z10Zpost10Z
2008ServerZ2008ServerR2Z
2012ServerZ2012ServerR2Zpost2012ServerR2c(Csyddlm}Wntk
r,||||fSXyddlm}m}m}m}Wn,tk
rvddlm}m}m}m}YnX|}	|	j	p|	dd\}
}}dj
|
||}tj|
|fptj|
dfp|}|	dd|
|fkr$ydj
|	j
}Wn8tk
r"|ddd	krd
|dd}YnXt|	dddkrZtj|
|fpXtj|
dfpX|}d}
z.y||d}
||
d
d}WnYnXWd|
r||
X||||fS)Nr)getwindowsversion)	OpenKeyExQueryValueExCloseKeyHKEY_LOCAL_MACHINEr~z{0}.{1}.{2}r=zSP{}
z
Service Pack ZSPZproduct_typez,SOFTWARE\Microsoft\Windows NT\CurrentVersionZCurrentType)rrImportErrorwinregrrrr_winregZplatform_versionformat_WIN32_CLIENT_RELEASESrZservice_pack_majorAttributeErrorgetattr_WIN32_SERVER_RELEASES)rrcsdptyperrrrrZwinverZmajminrkeyrrr	win32_versD

rcCsd}tjj|sdSyddl}Wntk
r4dSXt|d}|j|}WdQRX|d}d	}tjj}|d
krxd}|||fS)Nz0/System/Library/CoreServices/SystemVersion.plistrr"ZProductVersionr ppcPower MacintoshZPowerPC)r r r )rr)	r*r+rCplistlibrr,loadunamemachine)fnrr7rrversioninforrrr_mac_ver_xmlEs
rcCst}|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)rrrrrrrmac_ver[srcCs@ddlm}y|j|}|dkr$|S|Stk
r:|SXdS)Nr)System)	java.langrZgetPropertyr)namedefaultrrMrrr
_java_getpropns
rcCsyddl}Wntk
r(||||fSXtd|}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)rrr)rvendorvminfoosinfojavaZvm_nameZ
vm_releaseZ	vm_vendoros_name
os_versionos_archrrrjava_verys"












rcCs|dkrd|||fS|dkr|dkr0|||fS|jd}|ryt|d}Wntk
rbYn X|d}t||d<dj|}|dkrd	}qd	}n,|d
krd}|r|d}qd
}n|dkrd}|||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.

    ZRhapsodyzMacOS X ServerZSunOS5r}rr~6ZSolarisZIRIX64ZIRIXz (64bit)64bitrrWindows)rr)rrrrrt)rrrrcmajorrrrsystem_aliass2	



rcGsdjddtt|D}|jdd}|jdd}|jdd}|jdd}|jd	d}|jd
d}|jdd}|jdd}|jd
d}x|jdd}||krP|}qWx|ddkr|dd}qW|S)zq Helper to format the platform string in a filename
        compatible format e.g. "system-version-machine".
    r>css|]}|jVqdS)N)rD)r%xrrr	<genexpr>sz_platform.<locals>.<genexpr> _/\:;"()unknownr z--r?NrBrB)rtfilterr.replace)argsrZcleanedrrr	_platforms$rcCsDyddl}Wntk
r |SXy|jStk
r>|SXdS)z8 Helper to determine the node name of this machine.
    rN)socketrZgethostnamerr)rrrrr_nodesrcCsFtjj|}x4tjj|r@tjjtjjtjj|tj|}qW|S)zT In case filepath is a symlink, follow it until a
        real file is reached.
    )r*r+abspathislinknormpathrtdirnamereadlink)filepathrrr_follow_symlinkss
"rcCshtjdkr|Sytjd|tf}Wnttfk
r<|SX|jj}|j	}|s\|r`|S|SdS)z. Interface to the system's uname command.
    rrrzuname %s 2> %sN)rrr)
rrr*ryDEV_NULLrrrr-rDr)Zoptionrr7outputrrrr
_syscmd_unames

rcCs|tjd	kr|St|}ytjd|gtjtjd}Wnttfk
rJ|SX|j	dj
d}|j}|sp|rt|S|SdS)
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.

    rrrrv)stdoutstderrrzlatin-1N)rrr)rrr
subprocessPopenPIPEZSTDOUTrrrZcommunicater$wait)targetrprocrrrrr_syscmd_files	


r	WindowsPErMSDOS)rrrcCs.|sLddl}y|jd}Wn |jk
r:|jd}YnXt|dd}|r\t|d}nd}|r|tjkrtjtkrttj\}}|r|}|r|}||fSd|kr||fSd	|krd
}nd|krd}nd
|krd}d|krd}n@d|krd|krd}nd}n d|krd}nd|kr&d}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.

    rNPrcbitr r4z32-bit32bitZN32Zn32bitz64-bitrZELFZPErrZCOFFzMS-DOSr)	structZcalcsizeerrorrrrr4r_default_architecture)r4bitslinkagersizeZfileoutrrcrrrarchitectureBsL





runame_resultz-system node release version machine processorcCsd}tdk	rtSd}ytj\}}}}}Wntk
rBd}YnX|sdttd|||||fr|rtj}d}d}t}d}d}|dkrt	\}}}}	|r|rd}|sdtj
krtj
jdd}ntj
jdd}|stj
jd|}|r<t|\}}}|d	krd
}n4|dkr<|d
kr<d
}d|dd
kr8d}nd}|dkrf|s`|dkr\d}nd}d
}n8|dddkrt
\}}
}}d}dj|}|s|
}|dkr
|s|dkr|}d}yddl}
Wntk
rYn&X|
jdd\}}|dkrd}nd}|stdd}|dkr(d}|dkr6d}|dkrDd}|dkrRd}|dkr`d}|dkrnd}|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?rZPROCESSOR_ARCHITEW6432ZPROCESSOR_ARCHITECTUREZPROCESSOR_IDENTIFIERzMicrosoft WindowsrZ	Microsoftz6.0r~rrrZ16bitrJavaz, ZOpenVMS0zSYI$_CPUZAlphaZVAXz-pr)rr)_uname_cacher*rrrrrrrrenvironrrrrtvms_librZgetsyirr)Zno_os_uname	processorrnoderrrZuse_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.

    )rrrrrrr%srcCstjS)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.

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

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

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

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

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

    )rrrrrrrSs
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}tj|d}|dk	r&|Sd|krd}|jdrHtj|}n
tj|}|dkrjtdt	||j
\}}}d}d}ntjjdrd}tj|}|dkrtdt	||j
\}}}}	}
|dkrd}tj}nd|kr"d}t
j|}|dkrtd	t	||j
\}}}}	d}n\tj|}|dkrFtd
t	||j
\}}}}	}d}|dkrld}n|	r~|d|	}ttd
rtj\}
}}n<ttdrtj\}
}}n"ttdrtj\}
}}nd}d}|jd}
t|
dkr|
jddj|
}|||||||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
_mercurial
subversionr}r=r)rr_sys_version_cacher
startswith_ironpython_sys_version_parserr_ _ironpython26_sys_version_parserrreprr3r_sys_version_parser_pypy_sys_version_parserr)rrrrr.rrt)sys_versionrrr_rZalt_versionZcompilerZbuildnoZ	builddateZ	buildtimerZbranchZrevisionrcrrr_sys_version}s|











r
cCs
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).

    r)r
rrrrpython_implementationsrcCs
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?)r
rrrrpython_versionsrcCsttdjdS)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?r})r`r
rrrrrpython_version_tuples	rcCs
tdS)z Returns a string identifying the Python implementation
        branch.

        For CPython this is the Subversion branch from which the
        Python binary was built.

        If not available, an empty string is returned.

    r=)r
rrrr
python_branch
srcCs
tdS)z Returns a string identifying the Python implementation
        revision.

        For CPython this is the Subversion revision from which the
        Python binary was built.

        If not available, an empty string is returned.

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

    rr)r
rrrrpython_build%srcCs
tdS)zS Returns a string identifying the compiler used for compiling
        Python.

    r)r
rrrrpython_compiler-srcCstj||fd}|dk	r|St\}}}}}}||kr:d}|rPt|||\}}}|dkrt|\}	}
}}|rxt||}
nt||||}
n.|dkrtj"tjddt	t
d\}}}WdQRX|r|rt||||d|||}
n$ttj
\}}t||||d||}
n|dkr\t\}}}\}}}|s8|rFt|||}
nt|||d	|||}
n\|d
kr|rxt||}
nt|||}
n2|rt||}
n ttj
\}}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 rLinuxignorez?dist\(\) and linux_distribution\(\) functions are deprecated .*withrZonZMacOS)r)_platform_cacherrrrrrfcatch_warningsfilterwarningsrhrwr;rr4rr)aliasedterserrrrrrrZrelZversrrrrIZdistversionZdistidZlibcnameZlibcversionrmrrrrrrrrrrr9s\







r__main__rz--terseZ
nonaliasedz--nonaliased)rrr)r<rQrRrSrTrUrVrWrArXrYrZr[r\r]rB)rmrB)r rrr)r r r r)rr)rr?)rr=)rN)rr)rr?)rr=)rr~)rN)rr)rN)rr=)rr)rr?)rr=)rr~)rN)r r r r r r r )r rr r r r r r r )r r r r!)r )r )r )r r)r r)r r)N)rr)P__doc__Z
__copyright____version__collectionsrr*rerrfdevnullrrrrqrcompilerrASCIIr/r4r;rPrsr^raZ_supported_distsrdrlrirwryrrrrrrrrrrrrrrrrrr
namedtuplerrrrrrrrrr
rrrrr
rrrrrrrr__name__argvrrprintexitrrrr<module>
se 




:26
	



0
0

#6 


T	
			
k




[


OHA YOOOO