Package sparked :: Module application :: Class Options
[hide private]
[frames] | no frames]

Class Options

source code

              object --+        
                       |        
                    dict --+    
                           |    
twisted.python.usage.Options --+
                               |
                              Options

Option parser for sparked applications.

Spark applications which need their own commandline arguments can inherit from this class: it takes care of the --version and --help arguments, using the __version__ and docstring from the sparked application:

 # sparked example --version
 example 0.1.0 (sparked 0.1)

 # sparked example --help
 sparked [sparked options] example [options]
 Options:
    -f, --fast   Run fast
    --version
    --help       Display this help and exit.

 Example runner class for sparked.
Instance Methods [hide private]
 
getSynopsis(self)
Returns a string containing a description of these options and how to pass them to the executed file.
source code
 
opt_version(self) source code

Inherited from twisted.python.usage.Options: __hash__, __init__, __str__, getUsage, opt_help, parseArgs, parseOptions, postOptions

Inherited from twisted.python.usage.Options (private): _gather_flags, _gather_handlers, _gather_parameters, _generic_flag

Inherited from dict: __cmp__, __contains__, __delitem__, __eq__, __ge__, __getattribute__, __getitem__, __gt__, __iter__, __le__, __len__, __lt__, __ne__, __new__, __repr__, __setitem__, __sizeof__, clear, copy, fromkeys, get, has_key, items, iteritems, iterkeys, itervalues, keys, pop, popitem, setdefault, update, values

Inherited from object: __delattr__, __format__, __reduce__, __reduce_ex__, __setattr__, __subclasshook__

Class Variables [hide private]
  appName = None
hash(x)

Inherited from twisted.python.usage.Options: defaultSubCommand, parent, subCommand

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

getSynopsis(self)

source code 

Returns a string containing a description of these options and how to pass them to the executed file.

Overrides: twisted.python.usage.Options.getSynopsis
(inherited documentation)

opt_version(self)

source code 
Overrides: twisted.python.usage.Options.opt_version