/usr/lib/python3/dist-packages/twisted/web/__pycache__
Edit: /usr/lib/python3/dist-packages/twisted/web/__pycache__/twcgi.cpython-310.pyc (10250B)
o
b. @ s d Z ddlZddlZddlmZ ddlmZ ddlmZ ddl m
Z
ddlmZm
Z
mZmZ G dd d e
jejZG d
d de
jZG dd
d
eZG dd deje
jZdS )zH
I hold resource classes and helper classes that deal with CGI scripts.
N)protocol)Logger)filepath)pb)httpresourceserverstaticc @ s$ e Zd Zdd Zdd Zdd ZdS )CGIDirectoryc C s t j| tj| | d S N)r Resource__init__r FilePath)selfpathname r 3/usr/lib/python3/dist-packages/twisted/web/twcgi.pyr
s zCGIDirectory.__init__c C s6 | |}| s
tjjS | rt|jS t|jS r ) childexistsr File
childNotFoundisdirr
path CGIScript)r r requestfnpr r r getChild s
zCGIDirectory.getChildc C s t d}||S )Nz1CGI directories do not support directory listing.)r
NoResourcerender)r r notFoundr r r r $ s
zCGIDirectory.renderN)__name__
__module____qualname__r
r r r r r r r
s r
c @ s2 e Zd ZdZdZd
ddZdd Zg fdd ZdS )r z
L{CGIScript} is a resource which runs child processes according to the CGI
specification.
The implementation is complex due to the fact that it requires asynchronous
IPC with an external process with an unpleasant protocol.
Nc C s$ || _ |du r
ddlm} || _dS )zA
Initialize, with the name of a CGI script file.
Nr )reactor)filenametwisted.internetr$ _reactor)r r% registryr$ r r r r
6 s
zCGIScript.__init__c
C s dd |j }| dd }tj|d|jt| j |j
|| j|jd }|
j}|dur4||d<