Файловый менеджер - Редактировать - /opt/imh-python/lib/python3.9/site-packages/twisted/web/__pycache__/script.cpython-39.pyc
Ðазад
a k�hG � @ s� d Z ddlZddlZddlmZ ddlmZ ddlmZm Z ddl mZ ddlm Z mZmZmZmZ dZG d d � d e�ZG dd� d�Ze�d de�Zdd� Zdd� ZG dd� dej�ZG dd� dej�ZG dd� dej�ZdS )zH I contain PythonScript, which is a very simple python script resource. � N)�StringIO)� copyright)�execfile� networkString)�_coerceToFilesystemEncoding)�http�resource�server�static�utilz�<p>You forgot to assign to the variable "resource" in your script. For example:</p> <pre> # MyCoolWebApp.rpy import mygreatresource resource = mygreatresource.MyGreatResource() </pre> c @ s e Zd ZdZdS )� AlreadyCachedzG This exception is raised when a path has already been cached. N)�__name__� __module__�__qualname__�__doc__� r r ��/root/rpmbuild/BUILDROOT/imh-python39-modules-3.9.7-92.el8.x86_64/opt/imh-python/lib/python3.9/site-packages/twisted/web/script.pyr s r c @ s$ e Zd Zdd� Zdd� Zdd� ZdS )�CacheScannerc C s || _ || _d| _d S )Nr )�path�registry�doCache��selfr r r r r �__init__% s zCacheScanner.__init__c C s* | j �| j�}|d urt|��| �� d S �N)r Z getCachedPathr r �recache)r �cr r r �cache* s zCacheScanner.cachec C s d| _ d S )N� )r )r r r r r 0 s zCacheScanner.recacheN)r r r r r r r r r r r $ s r �� �Whoops! Internal Errorc C s� t | |�}td| �t||j|jd�}zt| ||� W n. tyb } z|jd W Y d}~S d}~0 0 |d }|jr�|tur�|� | |� |S )z� I am a normal py file which must define a 'resource' global, which should be an instance of (a subclass of) web.resource.Resource; it will be renderred. � )�__file__r r r r r Nr ) r r �noRsrcr r r r �argsr Z cachePath)r r �cs�glob�acZrsrcr r r �ResourceScript7 s � r( c C s| ddl m} td| �t�ddt�|d�}t| ��}|�|| �}W d � n1 sR0 Y t|dd�}t |||� |d S ) Nr )�ptl_compiler! r r )r"