File: //proc/thread-self/root/lib/python3/dist-packages/twisted/web/__pycache__/script.cpython-38.pyc
U
��W[q � @ s� d Z ddlmZmZ ddlZddlZddlmZ ddlm Z ddl
mZmZm
Z
mZ ddlmZmZmZmZmZ dZG d d
� d
e�ZG dd� d�Ze�d
de�Zdd� Zdd� ZG dd� dej�ZG dd� dej�ZG dd� dej�Z dS )zH
I contain PythonScript, which is a very simple python script resource.
� )�division�absolute_importN)� copyright)�_coerceToFilesystemEncoding)�execfile�
networkString�NativeStringIO�_PY3)�http�server�static�resource�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 �4/usr/lib/python3/dist-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 k rt|��| �� 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 . s zCacheScanner.recacheN)r r r r r r r r r r r "