grthtrhthjhtyjytjytkergtrhtrjytjerhrfh4:24 29/09/2026î   f©¶ã@s°dZdZdZddlZddlZddlZddlZddlZy ejZ Wn0e k r�ej d�krƒdZ nd Z YnXd Z ej d ejƒZejd d d dd„Zdd„Zej dejƒZej dejƒZej dejƒZd‘Zd$d%„Zd d d ed&d'd(„Zd d d ed)d*„Zd+d’d,d-„Zd d.d/„Zej d0ƒZd d d d“d1d2„Zi d3d”6d5d•6d6d–6d8d—6d9d˜6d;d™6d<dš6d=d›6d?dœ6d@d�6dBdž6Zid6dŸ6dCd 6dDd¡6dEd¢6dFd£6dGd¤6ZdHdI„Z d d d d dJdK„Z!dLdM„Z"d d¥d dNdO„Z#dPdQ„Z$d d d¦d§dRdS„Z%dTdU„Z&dVdW„Z'd dXdY„Z(dZd[„Z)d d\d]„Z*d d^d_„Z+id¨d6d©d6dªd6Z,ejd d dcdd„Z-ej.dedfƒZ/da0dgdh„Z1didj„Z2dkdl„Z3dmdn„Z4dodp„Z5dqdr„Z6dsdt„Z7ej duejƒZ8ej dvejƒZ9ej dwƒZ:ej dxƒZ;iZ<ddydz„Z=d{d|„Z>d}d~„Z?dd€„Z@d�d‚„ZAdƒd„„ZBd…d†„ZCd‡dˆ„ZDiZEddd‰dŠ„Z eFd‹kr¬dŒejGkphd�ejGkZHdŽejGko†d�ejGkZIeJe eIeHƒƒejKdƒndS)«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.7éNÚdosÚwin32Úwin16ZNULz /dev/nullz/etcsC(__libc_init)|(GLIBC_([0-9.]+))|(libc(_\w+)?\.so(?:\.(\d[0-9.]*))?)Úi@cCs³ttjdƒr'tjj|ƒ}nt|dƒ}|j|ƒ}d}xQd|ksfd|kr{tj||ƒ}nd}|s¬|j|ƒ}|s Pnd}qNndd„|jƒDƒ\}} } } } } |rí| ríd }n¢| r&|d krd }| }q�| |kr�| }q�ni| r�|d kr�d }| rY| |krY| }n| rŒ|t | ƒ d…| krŒ|| }qŒq�n|j ƒ}qNW|j ƒ||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. ÚrealpathÚrbrslibcsGLIBCNcSs1g|]'}|dk r'|jdƒn|‘qS)NÚlatin1)Údecode)Ú.0Ús©r ú-/opt/alt/python34/lib64/python3.4/platform.pyú ·s zlibc_ver..ZlibcÚglibc) ÚhasattrÚosÚpathrÚopenÚreadÚ _libc_searchÚsearchÚgroupsÚlenÚendÚclose)Ú executableÚlibÚversionZ chunksizeÚfZbinaryÚposÚmZlibcinitrZ glibcversionZsoZthreadsZ soversionr r r Úlibc_ver’sF "        # r!c CsÐtjjdƒr¯d}x‡tdƒD]y}|jƒ}t|ƒdkr%|\}}nq%|dkrv|jƒ}q%|dkr%|jdƒ}|d}q%q%W|||fStjjdƒrxYtdƒD]H}|jdƒ}t|ƒdkrÎ|dd krÎd |d |fSqÎWntjjd ƒrÃtjd ƒ} xHt t| ƒd ddƒD]*} | | d d …dkr[| | =q[q[W| rÃ| j ƒd}| dd d …}|||fSn|||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/infoÚSuSEéZMIN_DIST_VERSIONZ DIST_IDENTú-z/etc/.installedrZ OpenLinuxéz/usr/lib/setupNézslack-version-Ú slackwareéÿÿÿÿr(r() rrÚexistsrÚsplitrÚstripÚisdirÚlistdirÚrangeÚsort) ÚdistnamerÚidÚlineZtvÚtagÚvalueÚvaluesZpkgZverfilesÚnr r r Ú_dist_try_harderÌs:     "# r7z(\w+)[-_](release|version)z'(.+) release ([\d.]+)[^(]*(?:\((.+)\))?z1([^0-9]+)(?: release )?([\d.]+)[^(]*(?:\((.+)\))?r"ÚdebianÚfedoraÚredhatÚcentosÚmandrakeÚmandrivaÚrocksr'Ú yellowdogÚgentooÚ UnitedLinuxÚ turbolinuxÚarchÚmageiacCs³d}d}tj|ƒ}|dk r7t|jƒƒStj|ƒ}|dk rbt|jƒƒS|jƒjƒ}|r¦|d}t|ƒdkr¦|d}q¦nd||fS)Nrrr%)Ú_lsb_release_versionÚmatchÚtuplerÚ_release_versionr+r*r)Ú firstlinerr1r Úlr r r Ú_parse_release_files   rKr%cCs:ytjtƒ}Wntk r4|||fSYnX|jƒxd|D]L}tj|ƒ}|dk rF|jƒ\}} ||kr’|}Pq’qFqFWt|||ƒSt tj j t|ƒdddddƒ�} | j ƒ} WdQXt | ƒ\}} } |r|r|}n| r| }n| r-| }n|||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. NÚrÚencodingzutf-8ÚerrorsÚsurrogateescape)rr-Ú _UNIXCONFDIRÚOSErrorr/Ú_release_filenamerFrr7rrÚjoinÚreadlinerK)r0rr1Úsupported_distsÚfull_distribution_nameZetcÚfiler Z _distnameZdummyrrIZ_versionZ_idr r r Úlinux_distribution+s0          rXcCst|||d|ddƒS)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. rUrVr)rX)r0rr1rUr r r ÚdistcsrYrLcCs5ddl}|jdtddƒtj|||ƒS)z! Portable popen() interface. rNzuse os.popen insteadÚ stacklevelr#)ÚwarningsÚwarnÚDeprecationWarningrÚpopen)ÚcmdÚmodeÚbufsizer[r r r r^us r^c Cs…|jdƒ}|r%|j|ƒnytt|ƒ}Wntk rR|}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é)r*ÚappendÚmapÚintÚ ValueErrorÚlistÚstrrS)rÚbuildrJZintsZstringsr r r Ú _norm_version}s  rkz'(?:([\w ]+) ([\w.]+) .*\[.* ([\d.]+)\])c Cs;tj|kr|||fSx~dD]i}y7t|ƒ}|jƒ}|jƒr_tdƒ‚nWn(tk rŠ}zw#WYdd}~Xq#XPq#W|||fS|jƒ}tj|ƒ}|dk r.|j ƒ\}}}|d dkrü|dd …}n|d dkr|dd …}nt |ƒ}n|||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. Úverúcommand /c verú cmd /c verzcommand failedNr%rb)rlrmrnr(r(r(r() ÚsysÚplatformr^rrrQr+Ú _ver_outputrFrrk) ÚsystemÚreleaserZsupported_platformsr_ÚpipeÚinfoZwhyr r r r Ú _syscmd_ver›s,        rvZ2000éZXPZ 2003Serverr#Zpost2003ÚVistaéÚ7Ú8z8.1rczpost8.1Z10é Zpost10Z 2008ServerZ 2008ServerR2Z 2012ServerZ 2012ServerR2Zpost2012ServerR2csñ|dks$|dkr1|dkr1|||fSddlm}m}m}m}m}m}ddlm‰m } G‡fdd†d|ƒ} |dƒ} |d ƒ} d } }x]|| kr| d9} || ƒ}| j | | j ƒ|t |ƒƒ}|s¶|||fSq¶W| j |dƒ}|s8|||fS||ƒ}| j|d||ƒ sd| rq|||fS|| ƒƒ}| j|d ||ƒ|ˆƒƒƒs´|||fS|jjd ?}|jjd @}|jjd ?}|||fS)Nryr#r)Úc_bufferÚPOINTERÚbyrefÚcreate_unicode_bufferÚ StructureÚWinDLL)ÚDWORDÚHANDLEcs‹eZdZd”fd”fd”fd”fd”fd”fd”fd”fd ”fd ”fd ”fd ”fd ”fg ZdS)z*_get_real_winver..VS_FIXEDFILEINFOZ dwSignatureZdwStrucVersionZdwFileVersionMSZdwFileVersionLSÚdwProductVersionMSÚdwProductVersionLSZdwFileFlagsMaskZ dwFileFlagsZdwFileOSZ dwFileTypeZ dwFileSubtypeZ dwFileDateMSZ dwFileDateLSN)Ú__name__Ú __module__Ú __qualname__Z_fields_r )rƒr r ÚVS_FIXEDFILEINFOñs             rŠÚkernel32ré‚réiÿÿ)Zctypesr}r~rr€r�r‚Zctypes.wintypesrƒr„ZGetModuleFileNameWZ_handlerZGetFileVersionInfoSizeWZGetFileVersionInfoWZVerQueryValueWÚcontentsr…r†)ÚmajÚminrjr}r~rr€r�r‚r„rŠr‹rZname_lenZ actual_lenÚnameÚsizeZ ver_blockZpvir )rƒr Ú_get_real_winverés:$ .        ' r“c(Cs'yddlm}Wn"tk r8||||fSYnXy&ddlm}m}m}m}Wn4tk r•ddlm}m}m}m}YnX|ƒ} t | dd…Œ\} } } dj | | | ƒ}t j | | fƒpt j | dfƒp|}| dd…| | fkrzydj | j ƒ}Wqztk rv|dd…d krrd |dd…}nYqzXnt| d dƒdkrÅtj | | fƒp¿tj | dfƒp¿|}nd} z5y&||d ƒ} || d ƒd}WnYnXWd| r|| ƒnX||||fS)Nr)Úgetwindowsversion)Ú OpenKeyExÚ QueryValueExÚCloseKeyÚHKEY_LOCAL_MACHINErcz {0}.{1}.{2}r#zSP{}é z Service Pack ZSPZ product_typez,SOFTWARE\Microsoft\Windows NT\CurrentVersionZ CurrentType)ror”Ú ImportErrorÚwinregr•r–r—r˜Ú_winregr“ÚformatÚ_WIN32_CLIENT_RELEASESÚgetZservice_pack_majorÚAttributeErrorÚgetattrÚ_WIN32_SERVER_RELEASES)rsrÚcsdÚptyper”r•r–r—r˜Zwinverr�r�rjÚkeyr r r Ú win32_ver$sD & '     r¦cCs­d}tjj|ƒsdSyddl}Wntk rDdSYnXt|dƒ�}|j|ƒ}WdQX|d}d }tjƒj}|d kr d}n|||fS) Nz0/System/Library/CoreServices/SystemVersion.plistrrZProductVersionrÚppcúPower MacintoshZPowerPC)rrr)r§r¨) rrr)ÚplistlibršrÚloadÚunameÚmachine)Úfnr©rZplrsÚ versioninfor¬r r r Ú _mac_ver_xmlTs     r¯cCs&tƒ}|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¯)rsr®r¬rur r r Úmac_verjs  r°c CsTddlm}y'|j|ƒ}|dkr2|S|SWntk rO|SYnXdS)Nr)ÚSystem)Ú java.langr±Z getPropertyr )r‘Údefaultr±r4r r r Ú _java_getprop}s  r´c Csùyddl}Wn"tk r4||||fSYnXtd|ƒ}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 ''). rNz java.vendorz java.versionz java.vm.namezjava.vm.vendorzjava.vm.versionz java.os.archz java.os.namezjava.os.version)r²ršr´) rsÚvendorÚvminfoÚosinfoÚjavaZvm_nameZ vm_releaseZ vm_vendorÚos_nameÚ os_versionÚos_archr r r Újava_verˆs"  r¼c Cs|dkrd|||fS|dkrÊ|dkrB|||fS|jdƒ}|r¬yt|dƒ}Wntk rYq¬X|d}t|ƒ|dçsz_platform..ú Ú_ú/ú\ú:ú;ú"ú(ú)Úunknownrz--r%Nr(r()rSÚfilterrÚreplace)ÚargsrpZcleanedr r r Ú _platformás$%  rÒcCsTyddl}Wntk r(|SYnXy|jƒSWntk rO|SYnXdS)z8 Helper to determine the node name of this machine. rN)ÚsocketršZ gethostnamerQ)r³rÓr r r Ú_nodes   rÔcCsetjj|ƒ}xLtjj|ƒr`tjjtjjtjj|ƒtj|ƒƒƒ}qW|S)zT In case filepath is a symlink, follow it until a real file is reached. )rrÚabspathÚislinkÚnormpathrSÚdirnameÚreadlink)Úfilepathr r r Ú_follow_symlinkss  1rÛc Cs†tjdkr|Sytjd|tfƒ}Wnttfk rN|SYnX|jƒjƒ}|j ƒ}| sz|r~|S|SdS)z. Interface to the system's uname command. rrrzuname %s 2> %sN)rzwin32zwin16) rorprr^ÚDEV_NULLr rQrr+r)Zoptionr³rÚoutputÚrcr r r Ú _syscmd_unames   rßc Cs§tjd kr|St|ƒ}y+tjd|gdtjdtjƒ}Wnttfk rh|SYnX|j ƒdj dƒ}|j ƒ}| s›|rŸ|S|Sd 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. rrrrWÚstdoutÚstderrrzlatin-1N)zdoszwin32zwin16) rorprÛÚ subprocessÚPopenÚPIPEZSTDOUTr rQZ communicater Úwait)Útargetr³ÚprocrÝrÞr r r Ú _syscmd_file-s     rèÚ WindowsPErÀÚMSDOSc Cs¬|scddl}y|jdƒ}Wn$|jk rK|jdƒ}YnXt|dƒd}n|r{t|dƒ}nd}| rä|tjkrätjtkrÚttj\}}|rÈ|}n|rÚ|}qÚn||fSd|krú||fSd |krd }n*d |kr$d }nd |kr9d}nd|krNd}nTd|krxd|krod}q¢d}n*d|kr�d}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. rNÚPrJéZbitrrz32-bitÚ32bitZN32Zn32bitz64-bitr¿ZELFZPErÀréZCOFFzMS-DOSrê) ÚstructZcalcsizeÚerrorrirèrorrpÚ_default_architecture)rÚbitsÚlinkagerîr’ZfileoutÚbrJr r r Ú architectureQsL                      rôÚ uname_resultz-system node release version machine processorcCs¼d}tdk rtSd}ytjƒ\}}}}}Wntk rUd}YnX|s�ttd|||||fƒƒ rW|r®tj}d}d}tƒ}d}nd}|dkrPt ƒ\}}}} |rê|rêd}n|s/dtj krtj j ddƒ}q/tj j ddƒ}n|sPtj j d|ƒ}qPn|rÉt |ƒ\}}}|d kr€d }qÉ|d krÉ|d krÉd }d |dd …kr½d}qÆd}qÉn|dkr|sù|dkrðd}qùd}nd }qW|dd…dkrWt ƒ\}} } } d}dj| ƒ}|sT| }qTqWn|dkrà| sv|dkr…|}d}nyddl} Wntk r©YqàX| jddƒ\}}|dkr×d}qàd}n|søtddƒ}n|dkr d}n|dkr"d}n|dkr7d}n|dkrLd}n|dkrad}n|dkrvd}n|d kr�|d kr�d }d}nt||||||ƒ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 ''. rNrr%rZPROCESSOR_ARCHITEW6432ZPROCESSOR_ARCHITECTUREZPROCESSOR_IDENTIFIERzMicrosoft WindowsrÀZ Microsoftz6.0rcrxrríZ16bitér¸ÚJavaz, ZOpenVMSÚ0zSYI$_CPUé€ZAlphaZVAXz-prÎ)zwin32zwin16)Ú _uname_cacherr«r rhrÏrorprÔr¦ÚenvironrŸrvr¼rSÚvms_libršZgetsyirßrõ)Z no_os_unameÚ processorrrÚnodersrr¬Zuse_syscmd_verr£r¤rµr¶r·rüZcsidZ cpu_numberr r r r«ªsž    +                                   r«cCs tƒjS)z� Returns the system/OS name, e.g. 'Linux', 'Windows' or 'Java'. An empty string is returned if the value cannot be determined. )r«rrr r r r rr4srrcCs tƒjS)z� Returns the computer's network name (which may not be fully qualified) An empty string is returned if the value cannot be determined. )r«rþr r r r rþ=srþcCs tƒjS)z� Returns the system's release, e.g. '2.2.0' or 'NT' An empty string is returned if the value cannot be determined. )r«rsr r r r rsGsrscCs tƒjS)z‡ Returns the system's release version, e.g. '#3 on degas' An empty string is returned if the value cannot be determined. )r«rr r r r rPsrcCs tƒjS)zt Returns the machine type, e.g. 'i386' An empty string is returned if the value cannot be determined. )r«r¬r r r r r¬Ysr¬cCs tƒjS)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. )r«rýr r r r rýbs rýzB([\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}ntj|dƒ}|dk r:|Sd|krÅd}|jdƒrmtj|ƒ}ntj|ƒ}|dkr¡tdt |ƒƒ‚n|j ƒ\}}}d}d}n=tj jdƒr8d}t j|ƒ}|dkrtdt |ƒƒ‚n|j ƒ\}}}} } tj }nÊd|krŸd}t j|ƒ}|dkr~td t |ƒƒ‚n|j ƒ\}}}} d}nct j|ƒ}|dkrÓtd t |ƒƒ‚n|j ƒ\}}}} }d }|d | }ttd ƒr&tj\} } } n0ttdƒrJtj\} } } n d} d} |jdƒ} t| ƒdkr–| jdƒdj| ƒ}n||| | |||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: %srr¸ZJythonz&failed to parse Jython sys.version: %sZPyPyz$failed to parse PyPy sys.version: %sz'failed to parse CPython sys.version: %sZCPythonrÅÚ _mercurialÚ subversionrbr#rø)rorÚ_sys_version_cacherŸÚ startswithÚ_ironpython_sys_version_parserrFÚ _ironpython26_sys_version_parserrgÚreprrrpÚ_sys_version_parserÚ_pypy_sys_version_parserrrÿrr*rrdrS)Ú sys_versionÚresultr‘rFrZ alt_versionZcompilerZbuildnoZ builddateZ buildtimerÆÚbranchZrevisionrJr r r Ú _sys_versionŠsn              r cCs tƒdS)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 r r r r Úpython_implementationîs r cCs tƒdS)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 r r r r Úpython_versionûsr cCsttƒdjdƒƒS)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%rb)rGr r*r r r r Úpython_version_tuples rcCs tƒdS)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 r r r r Ú python_branchs rcCs tƒdS)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. rc)r r r r r Úpython_revisions rcCstƒdd…S)zh Returns a tuple (buildno, builddate) stating the Python build number and date as strings. röry)r r r r r Ú python_build+srcCs tƒdS)zS Returns a string identifying the compiler used for compiling Python. ry)r r r r r Úpython_compiler3src Cs[tj||fdƒ}|dk r(|Stƒ\}}}}}}||krXd}n|r|t|||ƒ\}}}n|dkrÐt|ƒ\} } } } |r¸t||ƒ} qGt|||| ƒ} nw|d krYtdƒ\}}}|r"| r"t||||d|||ƒ} qGttj ƒ\}}t||||d||ƒ} nî|dkrÆt ƒ\}}}\}}}|s�| r¥t|||ƒ} qGt|||d|||ƒ} n�|dkrÿ|rêt||ƒ} qGt|||ƒ} nH|rt||ƒ} n0t tj ƒ\}}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. NrrÀÚLinuxÚwithr÷ZonZMacOS)r) Ú_platform_cacherŸr«rÂr¦rÒrYr!rorr¼rô)ÚaliasedÚterser rrrþrsrr¬rýZrelZversr£r¤rpr0Z distversionZdistidZlibcnameZ libcversionrLÚvr¶r¹rºr»rñròr r r rp?sR           rpÚ__main__rz--terseZ nonaliasedz --nonaliased)údosúwin32úwin16)zSuSEr8r9r:r;r<r=r>z slackwarer?r@rArBrCrDr()rrr)rwr)rwr%)rwr#)rwN)ryr)ryr%)ryr#)ryrc)ryN)r|r)r|N)rwr#)ryr)ryr%)ryr#)ryrc)ryN)rrr)rrr)rrr)rz WindowsPE)rzWindows)rzMSDOS)LÚ__doc__Z __copyright__Ú __version__Ú collectionsrorÚrerâÚdevnullrÜr rprPÚcompileÚASCIIrrr!r7rRrErHZ_supported_distsrKrXrYr^rkrqrvržr¢r“r¦r¯r°r´r¼rÂrÒrÔrÛrßrèrðrôÚ namedtuplerõrúr«rrrþrsrr¬rýrrrrrr r r rrrrrrr‡ÚargvrrÚprintÚexitr r r r Ú sÖf 0       8 0      5  /   ;0  # 6   T   Š     d   S