class documentation

class twisted.web.script.PythonScript(resource.Resource): (source)

View In Hierarchy

I am an extremely simple dynamic resource; an embedded python script.

This will execute a file (usually of the extension '.epy') as Python code, internal to the webserver.

Class Variable isLeaf Signal if this IResource implementor is a "leaf node" or not. If True, getChildWithDefault will not be called on this Resource.
Method __init__ Initialize me with a script name.
Instance Variable filename Undocumented
Instance Variable registry Undocumented
Method render Render me to a web client.

Inherited from Resource:

Class Variable server Undocumented
Instance Variable children Undocumented
Method listStaticNames Undocumented
Method listStaticEntities Undocumented
Method listNames Undocumented
Method listEntities Undocumented
Method listDynamicNames Undocumented
Method listDynamicEntities Undocumented
Method getStaticEntity Undocumented
Method getDynamicEntity Undocumented
Method delEntity Undocumented
Method reallyPutEntity Undocumented
Method getChild Retrieve a 'child' resource from me.
Method getChildWithDefault Retrieve a static or dynamically generated child resource from me.
Method getChildForRequest Undocumented
Method putChild Register a static child.
Method render_HEAD Default handling of HEAD method.
isLeaf = (source)

Signal if this IResource implementor is a "leaf node" or not. If True, getChildWithDefault will not be called on this Resource.

(type: bool)
def __init__(self, filename, registry): (source)

Initialize me with a script name.

filename = (source)

Undocumented

registry = (source)

Undocumented

def render(self, request): (source)

Render me to a web client.

Load my file, execute it in a special namespace (with 'request' and '__file__' global vars) and finish the request. Output to the web-page will NOT be handled with print - standard output goes to the log - but with request.write.

API Documentation for Twisted, generated by pydoctor 20.12.1 at 2021-02-28 19:53:36.