Package twisted :: Package tap :: Module web :: Class Options
[frames | no frames]

Class Options

dict --+    
       |    
 Options --+
           |
          Options


Method Summary
  __init__(self)
  opt_allow_ignore_ext(self)
Specify whether 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_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.
  postOptions(self)
I am called after the options are parsed.
    Inherited from Options
  __hash__(self)
  __str__(self, width)
  _gather_flags(self)
Gather up boolean (flag) options.
  _gather_handlers(self)
Gather up options with their own handler methods.
  _gather_parameters(self)
Gather options which take a value.
  _generic_flag(self, flagName, value)
  _generic_parameter(self, parameterName, value)
  getSynopsis(self)
  getUsage(self, width)
  opt_help(self)
Display this help and exit.
  opt_version(self)
  parseArgs(self)
I am called with any leftover arguments which were not options.
  parseOptions(self, options)
The guts of the command-line parser.
    Inherited from dict
  __cmp__(...)
  __contains__(...)
  __delitem__(...)
  __eq__(...)
  __ge__(...)
  __getattribute__(...)
  __getitem__(...)
  __gt__(...)
  __iter__(...)
  __le__(...)
  __len__(...)
  __lt__(...)
  __ne__(...)
  __repr__(...)
  __setitem__(...)
  clear(...)
  copy(...)
  get(...)
  has_key(...)
  items(...)
  iteritems(...)
  iterkeys(...)
  itervalues(...)
  keys(...)
  popitem(...)
  setdefault(...)
  update(...)
  values(...)
    Inherited from object
  __delattr__(...)
  __reduce__(...)
  __setattr__(...)
    Inherited from type
  __new__(...)

Class Variable Summary
str longdesc = 'This creates a web.tap file that can be used...
list optFlags = [['personal', '', 'Instead of generating a we...
list optParameters = [['port', 'p', '8080', 'Port to start th...
str synopsis = 'Usage: mktap web [options]'
    Inherited from Options
NoneType defaultSubCommand = None                                                                  
NoneType parent = None                                                                  
NoneType subCommand = None                                                                  

Method Details

opt_allow_ignore_ext(self)

Specify whether 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:
str
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'],
 ['notracebacks',
  'n',
  'Display tracebacks in broken web pages. Displaying tracebacks to us\
ers may be security risk!']]                                           

optParameters

Type:
list
Value:
[['port', 'p', '8080', 'Port to start the server on.'],
 ['logfile', 'l', None, 'Path to web CLF (Combined Log Format) log fil\
e.'],
 ['https', None, 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:
str
Value:
'Usage: mktap web [options]'                                           

Generated by Epydoc 2.0 on Sat May 15 20:07:51 2004 http://epydoc.sf.net