%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /lib/python3/dist-packages/twisted/python/__pycache__/
Upload File :
Create Path :
Current File : //lib/python3/dist-packages/twisted/python/__pycache__/runtime.cpython-312.pyc

�

Ϫ�f$���gd�ZddlZddlZddlZddlmZddlmZdefd�Z	dddd	d	d
�Z
Gd�d�Ze�Zej�Zy)
)�seconds�shortPythonVersion�Platform�platform�platformType�N)�time)�Optional�returnc�.�dtjddzS)z?
    Returns the Python version as a dot-separated string.
    z%s.%s.%sN�)�sys�version_info���8/usr/lib/python3/dist-packages/twisted/python/runtime.pyrrs����(�(��!�,�,�,r�win32�posix�java)�nt�cerrzorg.python.modules.osc�4�eZdZUdZejej�Ze	e
ed<ee
�Z
ejZ	dde	e
de	e
ddfd�Zdefd�Zde	e
fd	�Zdefd
�Zdefd�Zdefd�Zdefd
�Zdefd�Zdde
defd�Zdefd�Zdefd�Zdefd�Zy)rzC
    Gives us information about the platform we're running on.
    �typeN�namerr
c�P�|�tj|�|_|�||_yy)N)�knownPlatforms�getr�	_platform)�selfrrs   r�__init__zPlatform.__init__,s.����&�*�*�4�0�D�I���%�D�N� rc� �|jdk7S)z
        Do we know about this platform?

        @return: Boolean indicating whether this is a known platform or not.
        N�r�rs r�isKnownzPlatform.isKnown4s���y�y�D� � rc��|jS)zX
        Get platform type.

        @return: Either 'posix', 'win32' or 'java'
        r!r"s r�getTypezPlatform.getType<s���y�y�rc� �|jdk(S)z�
        Check if current platform is macOS.

        @return: C{True} if the current platform has been detected as macOS.
        �darwin)rr"s r�isMacOSXzPlatform.isMacOSXDs���~�~��)�)rc�Z�tjdtd��|j�S)a 
        Are we running in Windows NT?

        This is deprecated and always returns C{True} on win32 because
        Twisted only supports Windows NT-derived platforms at this point.

        @return: C{True} if the current platform has been detected as
            Windows NT.
        zgtwisted.python.runtime.Platform.isWinNT was deprecated in Twisted 13.0. Use Platform.isWindows instead.�)�
stacklevel)�warnings�warn�DeprecationWarning�	isWindowsr"s r�isWinNTzPlatform.isWinNTLs*��	�
�
�
<���		
��~�~��rc�(�|j�dk(S)z�
        Are we running in Windows?

        @return: C{True} if the current platform has been detected as
            Windows.
        r)r%r"s rr/zPlatform.isWindows^s���|�|�~��(�(rc�n�tjdk(xr!tj�jdk(S)z�
        Check if current platform is Windows Vista or Windows Server 2008.

        @return: C{True} if the current platform has been detected as Vista
        r�)r
r�getwindowsversion�majorr"s r�isVistazPlatform.isVistags,���|�|�w�&�M�3�+@�+@�+B�+H�+H�A�+M�Mrc�8�|jjd�S)z�
        Check if current platform is Linux.

        @return: C{True} if the current platform has been detected as Linux.
        �linux)r�
startswithr"s r�isLinuxzPlatform.isLinuxos���~�~�(�(��1�1r�_initCGroupLocationc�:�|j�syddlm}||�}|j�rg|j	�jd�D�cgc]}|jd���}}|D]'}t
|�dk(s�|djd�s�'y	ycc}w)
z�
        Check if the current platform is Linux in a Docker container.

        @return: C{True} if the current platform has been detected as Linux
            inside a Docker container.
        Fr)�FilePath�
�:rr*s/docker/T)r:�twisted.python.filepathr=�exists�
getContent�split�lenr9)rr;r=�initCGroups�x�
controlGroups�groups       r�isDockerzPlatform.isDockerws����|�|�~��4��2�3������(3�'=�'=�'?�'E�'E�e�'L��"#�����
��M��'�
 ���u�:��?�u�Q�x�':�':�;�'G��
 �
��s�Bc�f�|j�ry	tjy#t$rYywxYw)z�
        Check for symlink support usable for Twisted's purposes.

        @return: C{True} if symlinks are supported on the current platform,
                 otherwise C{False}.
        FT)r/�os�symlink�AttributeErrorr"s r�_supportsSymlinkszPlatform._supportsSymlinks�s8���>�>���
��
�
���"�
��
�s�$�	0�0c�2�	ddl}|duS#t$rYywxYw)zy
        Can threads be created?

        @return: C{True} if the threads are supported on the current platform.
        rNF)�	threading�ImportError)rrPs  r�supportsThreadszPlatform.supportsThreads�s'��	���D�(�(���	��	�s�
�	�c��	ddlm}m}	t	j
|��y#t$rYywxYw#|$rYywxYw)zf
        Return C{True} if we can use the inotify API on this platform.

        @since: 10.1
        r)�INotifyError�initFT)�twisted.python._inotifyrTrUrQrK�close)rrTrUs   r�supportsINotifyzPlatform.supportsINotify�sI��	�B�	��H�H�T�V�����	��	��
�	��	�s�&�5�	2�2�=�=)NN)z/proc/1/cgroup)�__name__�
__module__�__qualname__�__doc__rrrKrrr	�str�__annotations__�staticmethodrr
rrr�boolr#r%r(r0r/r6r:rIrNrRrXrrrrr#s����)�,�,�R�W�W�5�D�(�3�-�5��7�#�G����I�EI�&��S�M�&�4<�S�M�&�	
�&�!��!���#���*�$�*� �� �$)�4�)�N��N�2��2��C��t��8�4��2�����rr)�__all__rKr
r,rr�typingr	r]rrrrr%rrrr�<module>rcse��
��
�
�� ��-�C�-��
�
��#���e�e�P�:�����!�r

Zerion Mini Shell 1.0