File: //proc/self/root/usr/lib/python3/dist-packages/twisted/python/__pycache__/runtime.cpython-38.pyc
U
W[~ � @ s� d dl mZmZ d dlZd dlZd dlZd dlZd dlmZ dd� Z dddddd �Z
dejiZeG d
d� d��Ze� Z
e
�� Ze
jZdS )� )�division�absolute_importN)� _oldStylec C s dt jdd� S )z?
Returns the Python version as a dot-separated string.
z%s.%s.%sN� )�sys�version_info� r r �8/usr/lib/python3/dist-packages/twisted/python/runtime.py�shortPythonVersion s r
�win32�posix�java)�ntZcer r
zorg.python.modules.osc @ s� e Zd ZdZe�ej�Ze e
�eej��Ze
jZddd�Zdd� Zdd� Zd d
� Zdd� Zd
d� Zdd� Zdd� Zddd�Zdd� Zdd� Zdd� ZdS )�PlatformzC
Gives us information about the platform we're running on.
Nc C s8 |d k r&t �|�| _t�| jtj�| _|d k r4|| _d S )N)�knownPlatforms�get�type�_timeFunctions�time�seconds� _platform)�self�name�platformr r r �__init__3 s
zPlatform.__init__c C s
| j dkS )z�
Do we know about this platform?
@return: Boolean indicating whether this is a known platform or not.
@rtype: C{bool}
N�r �r r r r �isKnown; s zPlatform.isKnownc C s | j S )zo
Get platform type.
@return: Either 'posix', 'win32' or 'java'
@rtype: C{str}
r r r r r �getTypeE s zPlatform.getTypec C s
| j dkS )z�
Check if current platform is macOS.
@return: C{True} if the current platform has been detected as macOS.
@rtype: C{bool}
�darwin)r r r r r �isMacOSXO s zPlatform.isMacOSXc C s t jdtdd� | �� S )a8
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.
@rtype: C{bool}
zgtwisted.python.runtime.Platform.isWinNT was deprecated in Twisted 13.0. Use Platform.isWindows instead.� )�
stacklevel)�warnings�warn�DeprecationWarning� isWindowsr r r r �isWinNTY s �zPlatform.isWinNTc C s | � � dkS )z�
Are we running in Windows?
@return: C{True} if the current platform has been detected as
Windows.
@rtype: C{bool}
r )r r r r r r&