| Server IP : 217.160.0.135 / Your IP : 216.73.217.85 Web Server : Apache System : Linux www 6.18.52-i1-ampere #1203 SMP Mon Sep 14 18:29:59 CEST 2026 aarch64 User : sws1074145052 ( 1074145052) PHP Version : 8.3.32 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : /usr/lib/python3/dist-packages/zmq/eventloop/minitornado/__pycache__/ |
Upload File : |
�
mc�c � �� � d Z ddlmZmZmZmZ ddlZ ed ed� � � � sd� Z e
Ze
Znd� Z e
ZeZd� ZeZej d k r ed
� � n ed� � d� Z G d
� de� � Zd� ZdS )a� Miscellaneous utility functions and classes.
This module is used internally by Tornado. It is not necessarily expected
that the functions and classes defined here will be useful to other
applications, but they are documented here in case they are.
The one public-facing part of this module is the `Configurable` class
and its `~Configurable.configure` method, which becomes a part of the
interface of its subclasses, including `.AsyncHTTPClient`, `.IOLoop`,
and `.Resolver`.
� )�absolute_import�division�print_function�with_statementN� � c � � | S �N� ��ss �@/usr/lib/python3/dist-packages/zmq/eventloop/minitornado/util.py�ur s � ��r c �, � | � d� � S )N�unicode_escape)�decoder s r r r s � ��x�x�(�)�)�)r c �� � t | t � � r#t t ur| � d� � } | � d� � dk rt | dd� � S | � d� � }t d� |dd� � � dd|d gd� � } t ||d � � S # t $ r t d|d z � � �w xY w)a Imports an object by name.
import_object('x') is equivalent to 'import x'.
import_object('x.y.z') is equivalent to 'from x.y import z'.
>>> import tornado.escape
>>> import_object('tornado.escape') is tornado.escape
True
>>> import_object('tornado.escape.utf8') is tornado.escape.utf8
True
>>> import_object('tornado') is tornado
True
>>> import_object('tornado.missing_module')
Traceback (most recent call last):
...
ImportError: No module named missing_module
zutf-8�.r N���zNo module named %s)�
isinstance�unicode_type�str�encode�count�
__import__�split�join�getattr�AttributeError�ImportError)�name�parts�objs r �
import_objectr$ % s� � �$ �$��%�%� $�#�\�*A�*A��{�{�7�#�#���z�z�#���!����$��d�+�+�+��J�J�s�O�O�E�
�S�X�X�e�C�R�C�j�)�)�4���b� �{�A�
F�
F�C�<��s�E�"�I�&�&�&��� <� <� <��.��r��:�;�;�;�<���s �.C �#C')� z�
def raise_exc_info(exc_info):
raise exc_info[1].with_traceback(exc_info[2])
def exec_in(code, glob, loc=None):
if isinstance(code, str):
code = compile(code, '<string>', 'exec', dont_inherit=True)
exec(code, glob, loc)
ah
def raise_exc_info(exc_info):
raise exc_info[0], exc_info[1], exc_info[2]
def exec_in(code, glob, loc=None):
if isinstance(code, basestring):
# exec(string) inherits the caller's future imports; compile
# the string first to prevent that.
code = compile(code, '<string>', 'exec', dont_inherit=True)
exec code in glob, loc
c �\ � t | d� � r| j S | j r
| j d S dS )aL Provides the errno from an Exception object.
There are cases that the errno attribute was not set so we pull
the errno out of the args but if someone instantiates an Exception
without any args you will get a tuple error. So this function
abstracts all that behavior to give you a safe way to get the
errno.
�errnor N)�hasattrr'