SlimOptionParser Class Reference

a subclass for optparse.OptionParser More...

Inherits optparse::OptionParser.

List of all members.

Public Member Functions

def __init__
def Types
 set the type for a prameter parse retuns values from type as Type[key]
def Parameters
 set parameters for
def Defaults
def new_group
 add a group of title and with 'doc' to the parser
def add_the_rest
 add any options that are not in a group
def add_all_slim_options
 add options from default_options module
def parse
 parse all slimpy options into global vars and return a list of all commandlist parameters not used in the option parse.
def set_types
 convers the string values in cpar to the corresponding type in self._types
def check_required
 add parameter to be checked when parse args is called if more that one arg then will check that only one of the arguments from args exists
def clp
 parse the comand line *args is a list of keys as of file

Public Attributes

 env


Detailed Description

a subclass for optparse.OptionParser

Definition at line 57 of file cmndLineParse.py.


Member Function Documentation

def __init__ (   self,
  arg,
  kw 
)

Definition at line 63 of file cmndLineParse.py.

def Types (   self,
  E,
  kw 
)

set the type for a prameter parse retuns values from type as Type[key]

Definition at line 88 of file cmndLineParse.py.

def Parameters (   self,
  args 
)

set parameters for

Definition at line 96 of file cmndLineParse.py.

def Defaults (   self,
  E,
  kw 
)

Definition at line 99 of file cmndLineParse.py.

def new_group (   self,
  title,
  doc,
  opts 
)

add a group of title and with 'doc' to the parser

Parameters:
title,: title: str
doc,: doc: str

Definition at line 110 of file cmndLineParse.py.

def add_the_rest (   self  ) 

add any options that are not in a group

Definition at line 123 of file cmndLineParse.py.

def add_all_slim_options (   self  ) 

add options from default_options module

Definition at line 167 of file cmndLineParse.py.

def parse (   self,
  args 
)

parse all slimpy options into global vars and return a list of all commandlist parameters not used in the option parse.

Definition at line 199 of file cmndLineParse.py.

def set_types (   self,
  cpar 
)

convers the string values in cpar to the corresponding type in self._types

retuns defaults updated with new typed cpar

Definition at line 239 of file cmndLineParse.py.

def check_required (   self,
  args 
)

add parameter to be checked when parse args is called if more that one arg then will check that only one of the arguments from args exists

Definition at line 266 of file cmndLineParse.py.

def clp (   self,
  arg 
)

parse the comand line *args is a list of keys as of file

Definition at line 301 of file cmndLineParse.py.


Member Data Documentation

env

Definition at line 75 of file cmndLineParse.py.


The documentation for this class was generated from the following file:

Generated on Sun Aug 10 09:11:12 2008 for SLIMpy by  doxygen 1.5.6