Your IP : 3.145.12.100


Current Path : /opt/alt/python34/lib64/python3.4/__pycache__/
Upload File :
Current File : //opt/alt/python34/lib64/python3.4/__pycache__/platform.cpython-34.pyc

�
e f���@s�dZdZdZddlZddlZddlZddlZddlZy
ejZ	Wn0e
k
r�ejd�kr�dZ	nd	Z	YnXd
Zej
dej�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�Zid3d�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��ZeFd�kr�d�ejGkphd�ejGkZHd�ejGko�d�ejGkZIeJeeIeH��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�
<listcomp>�s	zlibc_ver.<locals>.<listcomp>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!cCs�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
jt|�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|ddkr|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.<locals>.VS_FIXEDFILEINFOZdwSignatureZdwStrucVersionZdwFileVersionMSZdwFileVersionLS�dwProductVersionMS�dwProductVersionLSZdwFileFlagsMaskZdwFileFlagsZdwFileOSZ
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
|
||�}tj|
|f�ptj|
df�p|}|	dd�|
|fkrzydj
|	j
�}Wqztk
rv|dd�d	krrd
|dd�}nYqzXnt|	dd�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\CurrentVersionZCurrentType)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�cCsTddlm}y'|j|�}|dkr2|S|SWntk
rO|SYnXdS)Nr)�System)�	java.langr�ZgetPropertyr�)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 '').

    rNzjava.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�cCs|dkrd|||fS|dkr�|dkrB|||fS|jd�}|r�yt|d�}Wntk
rYq�X|d}t|�|d<dj|�}n|dkr�d	}q
d	}nC|d
kr�d}|r�|d}q
d
}n|dkr
d}n|||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 ServerZSunOS�5rbrrc�6ZSolarisZIRIX64ZIRIXz (64bit)�64bitrr�Windows)zwin32r)r*rfrgrirS)rrrsrrJ�majorrrr
�system_alias�s2	


		
		r�cGs!djdd�tt|�D��}|jdd�}|jdd�}|jdd�}|jdd�}|jd	d�}|jd
d�}|jdd�}|jdd�}|jd
d�}x,|jdd�}||kr�Pn|}q�Wx$|ddkr|dd�}q�W|S)zq Helper to format the platform string in a filename
        compatible format e.g. "system-version-machine".
    r$css|]}|j�VqdS)N)r+)r
�xrrr
�	<genexpr>�sz_platform.<locals>.<genexpr>� �_�/�\�:�;�"�(�)�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�ZgethostnamerQ)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�rQZcommunicater	�wait)�targetr��procr�r�rrr
�_syscmd_file-s		
r��	WindowsPEr��MSDOScCs�|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
jdd�}q/tj
jdd�}n|sPtj
jd|�}qPn|r�t|�\}}}|d	kr�d
}q�|dkr�|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|dkr�|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�)Zno_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=tjjd�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�rFrZalt_versionZcompilerZbuildnoZ	builddateZ	buildtimer��branchZrevisionrJrrr
�_sys_version�sn		

rcCst�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)rrrrr
�python_implementation�srcCst�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%)rr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)rGrr*rrrr
�python_version_tuples	rcCst�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#)rrrrr
�
python_branchsrcCst�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)rrrrr
�python_revisionsrcCst�dd�S)zh Returns a tuple (buildno, builddate) stating the Python
        build number and date as strings.

    r�ry)rrrrr
�python_build+srcCst�dS)zS Returns a string identifying the compiler used for compiling
        Python.

    ry)rr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||�}
n0ttj	�\}}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�rpr0ZdistversionZdistidZlibcnameZlibcversionrL�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�rrrrrrrr
rrrrrrr��argvrr�print�exitrrrr
�<module>
s�f0

		80			5	
	/

;0#6 
T		�	
					d



S

?>