| Server IP : 3.111.61.48 / Your IP : 216.73.216.67 Web Server : Apache System : Linux ip-10-0-5-176 6.8.0-1057-aws #60~22.04.1-Ubuntu SMP Wed May 27 08:16:59 UTC 2026 x86_64 User : ubuntu ( 1000) PHP Version : 8.2.31 Disable Function : exec,passthru,shell_exec,system MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : ON Directory : /lib/python3/dist-packages/twisted/web/__pycache__/ |
Upload File : |
o
�bG � @ 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 �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 urt|��| �� d S �N)r �
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 ty1 } z|jd W Y d}~S d}~ww |d }|jrC|turC|� | |� |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 � cachePath)r r �cs�glob�ac�rsrcr r r �ResourceScript7 s"