class twisted.web.tap.Options(usage.Options): (source)
Define the options accepted by the twistd web plugin.
Class Variable | synopsis | Undocumented |
Class Variable | optParameters | Undocumented |
Class Variable | optFlags | Undocumented |
Class Variable | compData | Undocumented |
Class Variable | longdesc | Undocumented |
Method | __init__ | Undocumented |
Method | opt_port | (DEPRECATED: use --listen) Strports description of port to start the server on |
Method | opt_https | (DEPRECATED: use --listen) Port to listen on for Secure HTTP. |
Method | opt_listen | Add an strports description of port to start the server on. [default: tcp:8080] |
Method | opt_index | Add the name of a file used to check for directory indexes. [default: index, index.html] |
Method | opt_user | Makes a server with ~/public_html and ~/.twistd-web-pb support for users. |
Method | opt_path | <path> is either a specific file or a directory to be set as the root of the web server. Use this if you have a directory full of HTML, cgi, epy, or rpy files or any other files that you want to be served up raw. |
Method | opt_processor | `ext=class' where `class' is added as a Processor for files ending with `ext'. |
Method | opt_class | Create a Resource subclass with a zero-argument constructor. |
Method | opt_resource_script | An .rpy file to be used as the root resource of the webserver. |
Method | opt_wsgi | The FQPN of a WSGI application object to serve as the root resource of the webserver. |
Method | opt_mime_type | Specify the default mime-type for static files. |
Method | opt_allow_ignore_ext | Specify whether or not a request for 'foo' should return 'foo.ext' |
Method | opt_ignore_ext | Specify an extension to ignore. These will be processed in order. |
Method | opt_add_header | Specify an additional header to be included in all responses. Specified as "HeaderName: HeaderValue". |
Method | postOptions | Set up conditional defaults and check for dependencies. |
Inherited from Options:
Instance Variable | subCommand | Undocumented |
Class Variable | defaultSubCommand | Undocumented |
Class Variable | parent | Undocumented |
Class Variable | completionData | Undocumented |
Instance Variable | opts | Undocumented |
Instance Variable | defaults | Undocumented |
Instance Variable | longOpt | Undocumented |
Instance Variable | shortOpt | Undocumented |
Instance Variable | docs | Undocumented |
Instance Variable | synonyms | Undocumented |
Method | opt_help | Display this help and exit. |
Method | opt_version | Display Twisted version and exit. |
Method | parseOptions | The guts of the command-line parser. |
Instance Variable | subOptions | Undocumented |
Method | parseArgs | I am called with any leftover arguments which were not options. |
Method | __str__ | Undocumented |
Method | getSynopsis | Returns a string containing a description of these options and how to pass them to the executed file. |
Method | getUsage | Undocumented |
Instance Variable | _dispatch | Undocumented |
Method | _generic_flag | Undocumented |
Method | _gather_flags | Gather up boolean (flag) options. |
Method | _gather_parameters | Gather options which take a value. |
Method | _gather_handlers | Gather up options with their own handler methods. |
(DEPRECATED: use --listen) Strports description of port to start the server on
Add an strports description of port to start the server on. [default: tcp:8080]
Add the name of a file used to check for directory indexes. [default: index, index.html]
Makes a server with ~/public_html and ~/.twistd-web-pb support for users.
<path> is either a specific file or a directory to be set as the root of the web server. Use this if you have a directory full of HTML, cgi, epy, or rpy files or any other files that you want to be served up raw.
`ext=class' where `class' is added as a Processor for files ending with `ext'.
Create a Resource subclass with a zero-argument constructor.
An .rpy file to be used as the root resource of the webserver.
The FQPN of a WSGI application object to serve as the root resource of the webserver.
Specify whether or not a request for 'foo' should return 'foo.ext'
Specify an extension to ignore. These will be processed in order.
Specify an additional header to be included in all responses. Specified as "HeaderName: HeaderValue".
Set up conditional defaults and check for dependencies.
If SSL is not available but an HTTPS server was configured, raise a UsageError
indicating that this is not possible.
If no server port was supplied, select a default appropriate for the other options supplied.