class documentation
class PythonScript(resource.Resource): (source)
Constructor: PythonScript(filename, registry)
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.
| Method | __init__ |
Initialize me with a script name. |
| Method | render |
Render me to a web client. |
| Class Variable | is |
Signal if this IResource implementor is a "leaf node" or not. If True, getChildWithDefault will not be called on this Resource. |
| Instance Variable | filename |
Undocumented |
| Instance Variable | registry |
Undocumented |
Inherited from Resource:
| Method | del |
Undocumented |
| Method | get |
Retrieve a 'child' resource from me. |
| Method | get |
Deprecated in favor of getChildForRequest. |
| Method | get |
Retrieve a static or dynamically generated child resource from me. |
| Method | get |
Undocumented |
| Method | get |
Undocumented |
| Method | list |
Undocumented |
| Method | list |
Undocumented |
| Method | list |
Undocumented |
| Method | list |
Undocumented |
| Method | list |
Undocumented |
| Method | list |
Undocumented |
| Method | put |
Register a static child. |
| Method | really |
Undocumented |
| Method | render_ |
Default handling of HEAD method. |
| Class Variable | allowed |
Undocumented |
| Class Variable | server |
Undocumented |
| Instance Variable | children |
Undocumented |
overrides
twisted.web.resource.Resource.renderRender 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.
overrides
twisted.web.resource.Resource.isLeafSignal if this IResource implementor is a "leaf node" or not. If True, getChildWithDefault will not be called on this Resource.