Package twisted :: Package tap :: Module web :: Class Options

[show private | hide private]
[frames | no frames]

## Class Options

    UserDict --+
               |
         Options --+
                   |
                  Options

Method Summary
| `__init__(self)`
| `__cmp__(self, dict)` (inherited from `UserDict`)
| `__delitem__(self, key)` (inherited from `UserDict`)
| ``__getattr__`(self, attr)` I make sure that old style 'optObj.option' access still works. (inherited from `Options`)
| `__getitem__(self, key)` (inherited from `UserDict`)
| `__hash__(self)` (inherited from `Options`)
| `__len__(self)` (inherited from `UserDict`)
| `__repr__(self)` (inherited from `UserDict`)
| `__setitem__(self, key, item)` (inherited from `UserDict`)
| `__str__(self, width)` (inherited from `Options`)
| `clear(self)` (inherited from `UserDict`)
| `copy(self)` (inherited from `UserDict`)
| `get(self, key, failobj)` (inherited from `UserDict`)
| `has_key(self, key)` (inherited from `UserDict`)
| `items(self)` (inherited from `UserDict`)
| `keys(self)` (inherited from `UserDict`)
| ``opt_allow_ignore_ext`(self)` Specify wether or not a request for 'foo' should return 'foo.ext'
| ``opt_class`(self, className)` Create a Resource subclass with a zero-argument constructor.
| ``opt_flashconduit`(self, port)` Start a flashconduit on the specified port.
| ``opt_help`(self)` Display this help and exit. (inherited from `Options`)
| ``opt_i`(self, indexName)` Add the name of a file used to check for directory indexes.
| ``opt_ignore_ext`(self, ext)` Specify an extension to ignore.
| ``opt_index`(self, indexName)` Add the name of a file used to check for directory indexes.
| ``opt_m`(self, defaultType)` Specify the default mime-type for static files.
| ``opt_mime_type`(self, defaultType)` Specify the default mime-type for static files.
| ``opt_path`(self, path)` <path> is either a specific file or a directory to be set as the root of the web server.
| ``opt_processor`(self, proc)` `ext=class' where `class' is added as a Processor for files ending with `ext'.
| ``opt_resource_script`(self, name)` An .rpy file to be used as the root resource of the webserver.
| ``opt_s`(self, path)` Same as --path, this is deprecated and will be removed in a future release.
| ``opt_static`(self, path)` Same as --path, this is deprecated and will be removed in a future release.
| ``opt_u`(self)` Makes a server with ~/public_html and ~/.twistd-web-pb support for users.
| ``opt_user`(self)` Makes a server with ~/public_html and ~/.twistd-web-pb support for users.
| `opt_version(self)` (inherited from `Options`)
| ``parseArgs`(self)` I am called with any leftover arguments which were not options. (inherited from `Options`)
| ``parseOptions`(self, options)` The guts of the command-line parser. (inherited from `Options`)
| `popitem(self)` (inherited from `UserDict`)
| ``postOptions`(self)` I am called after the options are parsed.
| `setdefault(self, key, failobj)` (inherited from `UserDict`)
| `update(self, dict)` (inherited from `UserDict`)
| `values(self)` (inherited from `UserDict`)
| ``_gather_flags`(self)` Gather up boolean (flag) options. (inherited from `Options`)
| ``_gather_handlers`(self)` Gather up options with their own handler methods. (inherited from `Options`)
| ``_gather_parameters`(self)` Gather options which take a value. (inherited from `Options`)
| `_generic_flag(self, flagName, value)` (inherited from `Options`)
| `_generic_parameter(self, parameterName, value)` (inherited from `Options`)

Class Variable Summary
`string` | `longdesc`
`list` | `optFlags`
`list` | `optParameters`
`string` | `synopsis`

Method Details

### opt_allow_ignore_ext(self)

Specify wether or not a request for 'foo' should return 'foo.ext'

### opt_class(self, className)

Create a Resource subclass with a zero-argument constructor.

### opt_flashconduit(self, port=None)

Start a flashconduit on the specified port.

### opt_i(self, indexName)

Add the name of a file used to check for directory indexes. [default: index, index.html]

### opt_ignore_ext(self, ext)

Specify an extension to ignore. These will be processed in order.

### opt_index(self, indexName)

Add the name of a file used to check for directory indexes. [default: index, index.html]

### opt_m(self, defaultType)

Specify the default mime-type for static files.

### opt_mime_type(self, defaultType)

Specify the default mime-type for static files.

### opt_path(self, 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, php3, epy, or rpy files or any other files that you want to be served up raw.

### opt_processor(self, proc)

`ext=class' where `class' is added as a Processor for files ending with `ext'.

### opt_resource_script(self, name)

An .rpy file to be used as the root resource of the webserver.

### opt_s(self, path)

Same as --path, this is deprecated and will be removed in a future release.

### opt_static(self, path)

Same as --path, this is deprecated and will be removed in a future release.

### opt_u(self)

Makes a server with ~/public_html and ~/.twistd-web-pb support for users.

### opt_user(self)

Makes a server with ~/public_html and ~/.twistd-web-pb support for users.

### postOptions(self)

I am called after the options are parsed.

Override this method in your subclass to do something after the options have been parsed and assigned, like validate that all options are sane.

  Overrides:
    `twisted.python.usage.Options.postOptions` (inherited documentation)

Class Variable Details

### longdesc

  Type:
    `string`
  Value:

        '''This creates a web.tap file that can be used by twistd.  If you spe\
        cify
        no arguments, it will be a demo webserver that has the Test class from
        twisted.web.test in it.'''

### optFlags

  Type:
    `list`
  Value:

        [['personal',
          '',
          'Instead of generating a webserver, generate a ResourcePublisher whi\
        ch listens on ~/.twistd-web-pb']]

### optParameters

  Type:
    `list`
  Value:

        [['port', 'p', '8080', 'Port to start the server on.'],
         ['telnet', 't', None, 'Run a telnet server on this port.'],
         ['logfile', 'l', None, 'Path to web log file.'],
         ['https', 's', None, 'Port to listen on for Secure HTTP.'],
         ['certificate', 'c', 'server.pem', 'SSL certificate to use for HTTPS.\
        '],
         ['privkey', 'k', 'server.pem', 'SSL certificate to use for HTTPS.']]

### synopsis

  Type:
    `string`
  Value:

        'Usage: mktap web [options]'

Generated by Epydoc 1.1 on Sat Feb 15 21:19:27 2003 | http://epydoc.sf.net