%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /lib/python3.12/__pycache__/
Upload File :
Create Path :
Current File : //lib/python3.12/__pycache__/platform.cpython-312.pyc

�

���fC�����dZdZdZddlZddlZddlZddlZddlZddlZddddddd	d	d
d
d�
Z	d�Z
dGd�ZdHd�Z		dId�Z
	ddlZd�Zgd�Zgd�Zd�Zd�Zd�ZdJd�Zd�ZdKd�Zd�ZdLd�Zd�Zd�ZdHd �Zd!�ZdHd"�Zd#d$d%d�Z ejBd
d
fd&�Z"d'�Z#Gd(�d)�Z$d*�Z%Gd+�d,ejLd-d.��Z'da(d/�Z)d0�Z*d1�Z+d2�Z,d3�Z-d4�Z.d5�Z/iZ0dMd6�Z1d7�Z2d8�Z3d9�Z4d:�Z5d;�Z6d<�Z7d=�Z8iZ9dNd>�Z:d?Z;da<d@�Z=dA�Z>e?dBk(r^dCej�vxsdDej�vZAdEej�vxrdFej�vZBeCe:eBeA��ej�d�yy#e$rd�ZY��(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.8�N�
���(�2��)
�dev�alpha�a�beta�b�c�RC�rc�pl�pc��tjd�}g}|j|�D])}|dvs�	t|d�}d}|j||f��+|S#t$rt
j
|d�}Y�8wxYw)Nz([0-9]+|[._+-])z._+-r�dr)�re�compile�split�int�
ValueError�_ver_stages�get�extend)�version�component_re�result�v�ts     �/usr/lib/python3.12/platform.py�_comparable_versionr#�s����:�:�0�1�L�
�F�
�
�
��
(�"���F�?�
*���2�J����
�M�M�1�a�&�!�"��M���
*��O�O�A�q�)��
*�s�A�A9�8A9�c�p�|sX	tjd�}|jd��}t|�dk(rt	|�S	tj}|s||fStjdtj�}t}tjj|�}t!|d�5}|j#|�}	d}
|
t|	�k�r*d|	vsd	|	vr|j%|	|
�}nd
}|r|j'�t|	�k(r7|j#|�}|r!|	t)|
t|	�dz
�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$rY���wxYwcc}
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�)�maxsplit�sC(__libc_init)|(GLIBC_([0-9.]+))|(libc(_\w+)?\.so(?:\.(\d[0-9.]*))?)�rbrslibcsGLIBCNi��latin1�libc�glibc)�os�confstrr�len�tuple�AttributeErrorr�OSError�sys�
executablerr�ASCIIr#�path�realpath�open�read�search�end�max�groups�decode)r5�libr�	chunksize�ver�parts�libc_search�V�f�binary�pos�m�chunk�s�libcinitr-�glibcversion�so�threads�	soversions                    r"�libc_verrQ�sd���	��*�*�2�3�C��I�I�q�I�)�E��5�z�Q���U�|�#���^�^�
����<���*�*�B�DF�8�8�	M�K�	�A����!�!�*�-�J�	
�j�$�	�"�1����	�"�����C��K���&� �H��$6��&�&�v�s�3���������3�v�;�.����y�)���#�C��S��[�4�-?�$@�$A�B�U�J�F��C��������E%��'(�m�����"��:�E%�A�H�e�\�2�w�	�������'�>�!�C�*�G��|�_�q��z�1�*�G���'�>� �C� �'�Q�y�\�A�g�J�5N�"+���7�C��L�=�>�#:�g�#E�")�G�"3���%�%�'�C�?�C��K��"�F��<���q�
�G�4�	��	��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�)r�append�list�map�strrr�join)r�build�l�stringss    r"�
_norm_versionr]�sm��
	�
�
�c��A��	�������s�3��C���,�-���h�h�w�r��{�#�G��N�������s�'A#�#A1�0A1��win32�win16�dosc	���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 verT�locale)�stdin�stderr�text�encoding�shellz'(?:([\w ]+) ([\w.]+) .*\[.* ([\d.]+)\])���rS)
r4�platform�
subprocess�check_output�DEVNULLr3�CalledProcessErrorrr�strip�matchr>r])
�system�releaser�supported_platformsrk�cmd�info�why�
ver_outputrIs
          r"�_syscmd_verrxs+���|�|�.�.��w��'�'��6�(��	��*�*�3�1;�1C�1C�2<�2D�2D�04�4<�15�+�7�D�
�(��w��'�'����-�.�J�
�:�:�<�D������A��}�#$�8�8�:� �����2�;�#���c�r�l�G��2�;�#���c�r�l�G� ��(���7�G�#�#��3��6�6�7�	���	�s�+C�C*�%C*c���ddd�|}tjdjdj|�|��j	d�}d�|D�}|D�cic]}|d|d	��
c}��fd
�|D�Scc}w)N�Win32_OperatingSystem�Win32_Processor)�OS�CPUzSELECT {} FROM {}�,�c3�>K�|]}|jd����y�w)�=N)�	partition)�.0�is  r"�	<genexpr>z_wmi_query.<locals>.<genexpr>Js����5�1�a�k�k�#�&�5�s�rr)c3�(�K�|]	}�|���y�w�N�)r��k�	dict_datas  �r"r�z_wmi_query.<locals>.<genexpr>Ls�����+��	�!��+�s�)�_wmi�
exec_query�formatrYr)�table�keys�data�
split_datar�r�s     @r"�
_wmi_queryr�As����)�$�
�������2�9�9��H�H�T�N�� 
���5��;�	
�6��5�
�)3�4�A�Q�q�T�1�Q�4�Z�4�	�+�d�+�+��5s�A8c��td��)Nz
not supported)r3)r�s r"r�r�>s
���o�&�&�))�rr'r�post11))rri�U�11)���r�10)�r�rTrz8.1)�r�r)r�8)�r�r'r�7)�r�rr�Vista))�r)i��XP64)�r�r)r�XPMedia))r�r'r�XP)�r�rr�2000)
)r��post2022Server))rri|O�
2022Server))rricE�
2019Server)r��
2016Server)r��2012ServerR2)r��
2012Server)r��2008ServerR2)r��
2008Server)r��
2003Server)r��
2000Serverc��t�dvS)N)�IoTUAP�
NanoServer�WindowsCoreHeadless�	IoTEdgeOS)�
win32_editionr�r�r"�win32_is_iotr�js���?�Z�Z�Zr�c��		ddl}	d}|j|j|�5}|j|d�dcddd�S#t$rddl}Y�MwxYw#1swYnxYw	y#t$rYywxYw#t$rYywxYw)Nr�,SOFTWARE\Microsoft\Windows NT\CurrentVersion�	EditionId)�winreg�ImportError�_winreg�	OpenKeyEx�HKEY_LOCAL_MACHINE�QueryValueExr3)r��cvkey�keys   r"r�r�ms���
�	%��	�C�E��!�!�&�";�";�U�C�
@�s��*�*�3��<�Q�?�
@�
@���	%�$�	%��
@�
@��
@�
���	���	���
���
�sP�A�A&�A�	A&�
A�A5�A�A5�A!�A&�&	A2�1A2�5	B�Bc�|�	tdddddd�\}}}}}t|�dk(}|r|dk7r	d	|�d
|��}nd	|��}||||fS#t$rYnwxYw	ddlm}n#t
$r	|||d
fcYSwxYw|�}t
|dd�dk(}	t�d}tt|jd
��\}	}
}n9#t$r-|jxs|dd\}	}
}dj|	|
|�}YnwxYw|dd|	|
fk(r<	dj|j�}n#t$r|dddk(rd	|ddz}YnwxYw		ddl}n#t
$rddl}YnwxYw	d}
|j#|j$|
�5}|j'|d�d}ddd�n#1swYnxYwn#t$rYnwxYw#t
$rYnwxYw||||fS)Nr|�Version�ProductType�	BuildType�ServicePackMajorVersion�ServicePackMinorVersionr'�0�SPrSr)�getwindowsversionT�product_typer)rTz{0}.{1}.{2}zSP{}�
z
Service Pack r��CurrentType)r�rr3r4r�r��getattrrxrWrr�platform_versionr��service_pack_majorr2r�r�r�r�r�)r�csd�ptyper��spmajor�spminor�	is_clientr��winver�major�minorrZr�r�r�s               r"�
_win32_verr�s6��
�<F�����%�%�
=
�8��,��w����&�!�+�	��w�#�~��w�i�q��	�*�C��w�i�.�C���U�I�-�-���
��
��)�)���)���U�D�(�(�)���
 �F�����3�q�8�I�<��-��"��!�#�w�}�}�S�'9�:���u�e���<�$�5�5�C�������u�e��&�&�u�e�U�;��<���b�q�z�e�U�^�#�	&��-�-�� 9� 9�:�C���	&��3�B�x�?�*��S���X�o���	&��
�	%����	%�$�	%��
	�C�E��!�!�&�";�";�U�C�
C�s��+�+�C��?��B��
C�
C�
C���	��	���
��
���C��	�)�)s��>A�	A
�A
�A�A*�)A*�0B6�63C,�+C,�:D�D2�1D2�7D<�;F)�<
E�	F)�E�F)�F�.F
�	F�
F�F�	F&�%F&�)	F5�4F5c����d}t|||�\}}}}|rKttt|j	d����|rt
nt}t�fd�|D�|�}||||fS)NFrSc3�4�K�|]\}}|�ks�|���y�wr�r�)r�r �r�
intversions   �r"r�zwin32_ver.<locals>.<genexpr>�s�����B�d�a��!�z�/��B�s�
�)r�r1rWrr�_WIN32_CLIENT_RELEASES�_WIN32_SERVER_RELEASES�next)rrrr�r�r��releasesr�s      @r"�	win32_verr��sh����I�%/���e�%D�"�G�S�%����3�s�G�M�M�#�$6�7�8�
�-6�)�<R���B�h�B�G�L���G�S�%�'�'r�c�2�d}tjj|�sy	ddl}t|d�5}|j
|�}ddd�d}d}tj�j}|dvrd}|||fS#t$rYywxYw#1swY�HxYw)Nz0/System/Library/CoreServices/SystemVersion.plistrr*�ProductVersion�r$r$r$)�ppczPower Macintosh�PowerPC)	r.r7�exists�plistlibr�r9�load�uname�machine)�fnr�rFrrr�versioninfor�s       r"�_mac_ver_xmlr��s���	;�B�
�7�7�>�>�"�����
�b�$���1�
�]�]�1�
����!�"�G��K��h�h�j� � �G��,�,����K��(�(���������s�A>�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�)rrr�r�rus    r"�mac_verr��s%���>�D������K��(�(r�c�`�ddlm}	|j|�}|�|S|S#t$r|cYSwxYw)Nr)�System)�	java.langr��getPropertyr2)�name�defaultr��values    r"�
_java_getpropr��s=�� ���"�"�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 '').

    rNzjava.vendorzjava.versionzjava.vm.namezjava.vm.vendorzjava.vm.versionzjava.os.archzjava.os.namezjava.os.version)r�r�r�)rr�vendor�vminfo�osinfo�java�vm_name�
vm_release�	vm_vendor�os_name�
os_version�os_archs           r"�java_verr	�s���/���=�&�
1�F��N�G�4�G�%+�"�G�Z���N�G�4�G��.�	�:�I��0�*�=�J�
�j�)�
+�F�#)� �G�Z���N�G�4�G��N�G�4�G��0�*�=�J�
�j�'�
)�F��F�F�F�*�*��!�/�����.�.�/�s�B�B�Bc��|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.

    �SunOS�5rSrrT�6�Solaris�r_r`�Windows)rrrXrYr)rqrrrr[r�s     r"�system_aliasr!s�������S�=��7�G�+�+��M�M�#����
&��A�a�D�	����	���5�z��!���(�(�1�+���S�=��F��F�	�%�	%���
�7�G�#�#��'�
��
�s�A,�,	A8�7A8c��djd�tt|�D��}|jdd�}|jdd�}|jdd�}|jdd�}|jdd�}|jd	d�}|jd
d�}|jdd�}|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�|]}|j����y�wr�)ro)r��xs  r"r�z_platform.<locals>.<genexpr>Qs����=�a����	�=�s�� �_�/�\�:�;�"�(�)�unknownr$z--riN)rY�filterr0�replace)�argsrj�cleaneds   r"�	_platformr$Ks���x�x�=�6�#�t�+<�=�=�H�����S�)�H�����S�)�H�����c�*�H�����S�)�H�����S�)�H�����S�)�H�����S�)�H�����S�)�H����	�2�.�H���"�"�4��-���h�����	�
�2�,�#�
��C�R�=���2�,�#�
��Or�c�r�	ddl}	|j�S#t$r|cYSwxYw#t$r|cYSwxYw)z8 Helper to determine the node name of this machine.
    rN)�socketr��gethostnamer3)r�r&s  r"�_noder(ksI������!�!�#�#��	������
�����s��(�%�%�6�6c��tjj|�}tjj|�r�tjj	tjjtjj
|�tj|���}tjj|�r��|S)zT In case filepath is a symlink, follow it until a
        real file is reached.
    )r.r7�abspath�islink�normpathrY�dirname�readlink)�filepaths r"�_follow_symlinksr0zs|��
�w�w���x�(�H�
�'�'�.�.��
"��7�7�#�#��G�G�L�L�������2�B�K�K��4I�J�L��
�'�'�.�.��
"��Or�c�J�tjdvr|S	ddl}t	|�}tt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`rN�C)�LC_ALL�filez-b)re�envzlatin-1)
r4rjrkr�r0�dictr.�environrlrmr3rnr?)�targetr�rkr5�outputs     r"�_syscmd_filer:�s����|�|�0�0������f�
%�F��r�z�z�#�
&�C���(�(�&�$��)?�0:�0B�0B�-0�)�2��
����=�=��#�#��#������
�Z�2�2�3�����s#�A7�!B�7B�B�B"�!B")r$�	WindowsPE)r$r)r$�MSDOSc��|s&ddl}|jd�}t|dz�dz}|r
t|d�}nd}|sO|tj
k(r<tjtvr"ttj\}}|r|}|r|}||fSd|vrd|vr||fSd	|vrd
}nd|vrd}d
|vrd
}||fSd|vrd|vrd}||fSd}||fSd|vrd}||fSd|vrd}||fS	||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�P��bitr$r5z
shared objectz32-bit�32bitz64-bit�64bit�ELF�PErr;�COFFzMS-DOSr<)�struct�calcsizerXr:r4r5rj�_default_architecture)r5�bits�linkagerF�size�fileoutr
r[s        r"�architecturerM�sT��.�����s�#���4�!�8�}�u�$����z�2�.������S�^�^�#��<�<�0�0�(����6�D�A�q��������W�}���7�"��g�'E��W�}���7����	�W�	���
�������=��
������!�G���=���G���=��
�7�	�����=��

�W�	���
��=��	
���=�r�c��	tdd�^}}	gd�t|�}|r|St
jjdd�xs t
jjdd�S#ttf$rY�SwxYw#t$rY�bwxYw)Nr}�Architecture)
�x86�MIPS�Alphar�N�ARM�ia64NN�AMD64NN�ARM64�PROCESSOR_ARCHITEW6432r$�PROCESSOR_ARCHITECTURE)r�rr�
IndexErrorr3r.r7r)�archrs  r"�_get_machine_win32r[�s������~�6�
���		���$�i��D����
�
�
���/��4�	5�
�
�
���/��4����J�'�	��	���
��
�s"�A<�A'�'A9�8A9�<	B�Bc�.�eZdZed��Zd�Zd�Zd�Zy)�
_Processorc�h�t|dtj��|j�}|�xsdS)N�get_r$)r�r4rj�from_subprocess)�cls�funcs  r"rz_Processor.gets-���s�d�3�<�<�.�1�3�3F�3F�G���v�|��r�c��	tddd�\}}|�d|��S#t$r+tjj	dt��cYSwxYw)Nr}�Manufacturer�Caption�, �PROCESSOR_IDENTIFIER)r�r3r.r7rr[)�manufacturer�captions  r"�	get_win32z_Processor.get_win32 sZ��	0�$.�u�n�i�$P�!�L�'��Y�b���/�/���	P��:�:�>�>�"8�:L�:N�O�O�	P�s��1A
�A
c�f�	ddl}|jdd�\}}|dk\rdSdS#t$rYywxYw)NrzSYI$_CPU�rR�VAX)�vms_lib�getsyir�)rn�csid�
cpu_numbers   r"�get_OpenVMSz_Processor.get_OpenVMS(sG��	;�� '�~�~�j�!�<��D�*�(�C�/�7�:�U�:��	�	��	�s�$�	0�0c��	ddl}	|jddg|jdd��j	�S#t$rYywxYw#t
|jf$rYywxYw)z)
        Fall back to `uname -p`
        rNr�z-pT�utf8)rerfrg)rkr�rlrmror3rn)rks r"r`z_Processor.from_subprocess1sx��	��	��*�*��$��!�)�)���	+��
�e�g�
���	��	����6�6�7�	��	�s �6�.A�	A�A�A�AN)�__name__�
__module__�__qualname__�classmethodrrjrrr`r�r�r"r]r]s#������0�;�r�r]c��|dk(rdS|S)Nrr$r�)�vals r"�_unknown_as_blankr{Ds���	�!�2�*�s�*r�c�l��eZdZdZdZejd��Z�fd�Ze	d��Z
d�Zd�Zd�Z
�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.
    )rq�noderrrr��	processorc�<�ttj��Sr�)r{r]r��selfs r"rzuname_result.processorXs�� ����!1�2�2r�c�^��tjt�|�
�|jf�Sr�)�	itertools�chain�super�__iter__r)r��	__class__s �r"r�zuname_result.__iter__\s)�������G���
�^�^��
�	
r�c��t|j�dz
}|j|g|���}t|�|dzk7rd|�dt|���}t|��|S)Nr'z	Expected z arguments, got )r0�_fields�__new__�	TypeError)ra�iterable�
num_fieldsr�msgs     r"�_makezuname_result._makebsb������%��)�
�����S�,�8�,���v�;�*�q�.�(��j�\�)9�#�f�+��G�C��C�.� ��
r�c��t|�|Sr�)r1)r�r�s  r"�__getitem__zuname_result.__getitem__ls���T�{�3��r�c�<�ttt|���Sr�)r0r1�iterr�s r"�__len__zuname_result.__len__os���5��d��$�%�%r�c�V�tt|�dt|j�dz
fS)Nr')r}r1r0r�r�s r"�
__reduce__zuname_result.__reduce__rs'���U�4�[�)?�#�d�l�l�*;�a�*?�@�@�@r�)rurvrw�__doc__r��	functools�cached_propertyrr�rxr�r�r�r��
__classcell__)r�s@r"r}r}JsQ���
�O�G����3��3�
����� �&�Ar�r}�uname_result_basez#system node release version machinec�~�t�tS	tj�x\}}}}}}t|�s�|dk(rt�\}}}}|xs
t�}|r|s0t|�\}}}|dk(rd}n|dk(r|dk(rd}d|dd	k(rd
}nd}|dvr|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}Y��wxYw)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$r�r_zMicrosoft Windowsr�	Microsoftz6.0rTr�rrA�16bitr�r�Javarf�OpenVMSr�)�_uname_cacher.r�r2r4rjr(�anyr�r[rxr	rYr}rWr{)rqr~rrrr��infosr�r�r�rr�valss            r"r�r�ys��������:<�(�(�*�D�/���g�w��%��u�:��W��+4�;�(�G�W�c�5��5�!3�!5�G��G�'2�6�':�$�F�G�W��,�,�"���;�&�7�i�+?�
#���G�B�Q�K�'�%�G� �G��'�'���W�$�%�G�%�G��F�
�B�Q�Z�6�
!�.6�j�+�G�V�V�V��F��i�i��'�G�� ������'�S�.��G��G�����I�!5������4��'�7�2�D���%6��!=�>�L����C�������w��&(�(��(�'�G���	�s�D
�
+D<�;D<c�*�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�rqr�r�r"rqrq�s���7�>�>�r�c�*�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~�s���7�<�<�r�c�*�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�rrr�r�r"rrrr�����7�?�?�r�c�*�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"rr�r�r�c�*�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��r�r�c�*�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�rr�r�r"rrs���7���r�c�0�|�tj}tj|d�}|�|St	j
dtj�}tjjd�rWd}|j|�}|�tdt|�z��|j�\}}}}}	|�d}tj}
n�d|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)ttd�rtj\}	}}
nd}d}
|j!d�}t#|�dk(r"|j%d�dj'|�}||||
|||
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*\[([^\]]+)\]?r�Jythonz&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: %s�CPythonr�_git�
_mercurialrSr)r�)r4r�_sys_version_cacherrrr6rj�
startswithrpr�reprr>�hasattrr�r�rr0rUrY)�sys_versionr�sys_version_parserr�rpr�buildno�	builddate�	buildtimer�compiler�pypy_sys_version_parser�branch�revisionr[s               r"�_sys_versionr�s:��*���k�k�� �
#�
#�K��
6�F�
���
����	��(�(�$���|�|���v�&���"�(�(��5���=��8��[�!�"�#�
#�5:�L�L�N�1���)�Y�����I��<�<��	�;�	�"$�*�*�
 �#!��
��'�-�-�k�:���=��C�!�+�.�/�0�
0�16����.���)�Y���#�(�(��5���=��9��[�!�"�#�
#��l�l�n�	9���)�Y�������I�
�!�C��)�3�I��s�F��!�h�h���6�8�	��l�	#�!�n�n���6�8�����	�
�
�c��A�
�1�v��{�	����
��(�(�1�+���G�V�X�w�	�8�
L�F�&,��{�#��Mr�c��t�dS)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).

    r�r�r�r�r"�python_implementationr�rs���>�!��r�c��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"�python_versionr�~s���>�!��r�c�L�tt�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'rS)r1r�rr�r�r"�python_version_tupler��s!������"�(�(��-�.�.r�c��t�dS)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)r�r�r�r"�
python_branchr��s���>�!��r�c��t�dS)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.

    rTr�r�r�r"�python_revisionr��s���>�!��r�c��t�ddS)zh Returns a tuple (buildno, builddate) stating the Python
        build number and date as strings.

    r�r�r�r�r�r"�python_buildr��s���>�!�A��r�c��t�dS)zS Returns a string identifying the compiler used for compiling
        Python.

    r�r�r�r�r"�python_compilerr��s���>�!��r�c	�z�tj||fd�}|�|St�\}}}}}}||k(rd}|rt|||�\}}}|dk(rt	�d}	|	rd}|	}|dk(r.t|�\}
}}}
|r
t
||�}n�t
||||�}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$�Darwinr�macOSr�Linux�withr��on)�_platform_cacherr�rr�r�r$rQr	rMr4r5)�aliased�terserrqr~rrrr�r�
macos_release�rel�versr�r�rj�libcname�libcversionr�r rrrrrIrJs                         r"rjrj�s���&�
 �
 �'�5�!1�4�
8�F�
���
�:?��6�F�D�'�7�G�Y��)���	��#/����#I� ����
����	�!��
���F�#�G�
��� )�'� 2���T�3��� ���1�H� ���'�3�?�H�	�7�	� (�
���+��V�W�g�y�#�%�k�1�3��
�6�	�7?�z�4��1�f�4�w�
�G��� ���'�:�H� ���'�!%�!(�*�g�?�H�� ���1�H�(����8�M�D�'� ���'�!*�D�'�;�H�)1�O�W�e�$�%��Or�)z/etc/os-releasez/usr/lib/os-releasec��dddd�}tjd�}tjd�}|D]I}|j|�}|��|jd|j	d��||j	d�<�K|S)	Nr��linux)�NAME�ID�PRETTY_NAMEzA^(?P<name>[a-zA-Z0-9_]+)=(?P<quote>["']?)(?P<value>.*)(?P=quote)$z\\([\\\$\"\'`])z\1r�r�)rrrp�sub�group)�linesru�os_release_line�os_release_unescape�line�mos      r"�_parse_os_releaser�s�������D��j�j�M��O��*�*�%7�8�����
�
"�
"�4�
(��
�>�%8�%<�%<��r�x�x��(�&�D����&�!�"���Kr�c�\�t�ed}tD]8}	t|d��5}t|�addd�tj�St	|ddj
t�����tj�S#1swY�UxYw#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_candidatesr9r�r3�errnorY�copy)r��	candidaterF�es    r"�freedesktop_os_releaser�/s���
� ���/�	�I�
 ��)�g�6�=�!�(9�!�(<�%�=���!�!�#�#�	���'��	�	�2H�(I�'J�K��
�
�!�!�#�#�=�=���
 ������
 �s-�
B�B�B�B		�B�	B+�B&�&B+�__main__r�z--terse�
nonaliasedz--nonaliased)Nr$r$i@)r$)r$r$r$r^)r$r$r$r$)r$r�r$)r$r$r�r�r�)FF)Er��
__copyright__�__version__�collectionsr.rr4r�r�rr#rQr]rxr�r�r�r�r�r�r�r�r�r�r�r�r	rr$r(r0r:rHr5rMr[r]r{�
namedtupler}r�r�rqr~rrrr�rr�r�r�r�r�r�r�r�r�r�rjr�r�r�r�ru�argvr�r��print�exitr�r�r"�<module>r�s/���r�
�*���	�	�
����
�b��R�	�
�B�

�C�	��� N�`
�202�#<�4$�l,��
,�����[��$<*�|
(�)�,)�&	�+�F&$�T�@
�	� $�N�
���� �N�N��R�I�X�8'�'�T+�)A��K����-�/�)A�X��U�r�����
���`�D
��	/�������H�\D�����6$�2�z��
����
 �
9�I����$9�E��3�8�8�+�N�N�c�h�h�4N�G�	�(�7�E�
"�#��C�H�H�Q�K���W �'�'�'�s�E"�"E.�-E.

Zerion Mini Shell 1.0