Package PyFoam :: Package Basics :: Module FoamOptionParser :: Class FoamOptionParser
[show private | hide private]
[frames | no frames]

Class FoamOptionParser

OptionContainer --+    
                  |    
       OptionParser --+
                      |
                     FoamOptionParser


Wrapper to the usual OptionParser to honor the conventions of OpenFOAM-utilities

Options that are not used by the script are passed to the OpenFOAM-application
Method Summary
  __init__(self, usage, version, description, interspersed)
  getArgs(self)
Return the arguments left after parsing
  getOptions(self)
Return the options
  parse(self, nr)
parse the options
    Inherited from OptionParser
  add_option_group(self, *args, **kwargs)
  check_values(self, values, args)
check_values(values : Values, args : [string]) -> (values : Values, args : [string])
  disable_interspersed_args(self)
  enable_interspersed_args(self)
  error(self, msg)
error(msg : string)
  format_help(self, formatter)
  format_option_help(self, formatter)
  get_default_values(self)
  get_option_group(self, opt_str)
  get_usage(self)
  get_version(self)
  parse_args(self, args, values)
parse_args(args : [string] = sys.argv[1:], values : Values = None) -> (values : Values, args : [string]) Parse the command-line options found in 'args' (default: sys.argv[1:]).
  print_help(self, file)
print_help(file : file = stdout)
  print_usage(self, file)
print_usage(file : file = stdout)
  print_version(self, file)
print_version(file : file = stdout)
  set_default(self, dest, value)
  set_defaults(self, **kwargs)
  set_usage(self, usage)
  _create_option_list(self)
  _get_args(self, args)
  _get_prog_name(self)
  _init_parsing_state(self)
  _match_long_opt(self, opt)
_match_long_opt(opt : string) -> string
  _populate_option_list(self, option_list, add_help)
  _process_args(self, largs, rargs, values)
_process_args(largs : [string], rargs : [string], values : Values) Process command-line arguments and populate 'values', consuming options and arguments from 'rargs'.
  _process_long_opt(self, rargs, values)
  _process_short_opts(self, rargs, values)
    Inherited from OptionContainer
  add_option(self, *args, **kwargs)
add_option(Option) add_option(opt_str, ..., kwarg=val, ...)
  add_options(self, option_list)
  format_description(self, formatter)
  get_option(self, opt_str)
  has_option(self, opt_str)
  remove_option(self, opt_str)
  set_conflict_handler(self, handler)
  set_description(self, description)
  _check_conflict(self, option)
  _create_option_mappings(self)
  _share_option_mappings(self, parser)

Class Variable Summary
    Inherited from OptionParser
list standard_option_list = []

Method Details

__init__(self, usage=None, version=None, description=None, interspersed=False)
(Constructor)

Parameters:
usage - usage string. If missing a default is used
version - if missing the PyFoam-version is used
description - description of the utility
interspersed - needs to be false if options should be passed to an OpenFOAM-utility
Overrides:
optparse.OptionParser.__init__

getArgs(self)

Return the arguments left after parsing

getOptions(self)

Return the options

parse(self, nr=3)

parse the options
Parameters:
nr - minimum number of arguments that are to be passed to the application

Generated by Epydoc 2.1 on Mon Jan 22 23:52:48 2007 http://epydoc.sf.net