Файловый менеджер - Редактировать - /opt/imh-python/lib/python3.9/site-packages/zmq/eventloop/minitornado/__pycache__/util.cpython-39.pyc
Ðазад
a a�h � @ s� d Z ddlmZmZmZmZ ddlZeded��sDdd� Z e Ze Zndd� Z e ZeZd d � ZeZejdkrted� ned � dd� ZG dd� de�Zdd� 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 C s | S �N� ��sr r ��/root/rpmbuild/BUILDROOT/imh-python39-modules-3.9.7-92.el8.x86_64/opt/imh-python/lib/python3.9/site-packages/zmq/eventloop/minitornado/util.py�u s r c C s | � d�S )N�unicode_escape)�decoder r r r r s c C s� t | t�rttur| �d�} | �d�dkr6t| dd�S | �d�}td�|dd� �dd|d gd�}zt||d �W S t y� t d|d ��Y n0 dS )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�objr r r � import_object% s $r )� 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 C s( t | d�r| jS | jr | jd S dS 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"