CMS 3D CMS Logo

Public Member Functions | Public Attributes

argparse::_VersionAction Class Reference

Inheritance diagram for argparse::_VersionAction:
argparse::Action argparse::Action argparse::_AttributeHolder argparse::_AttributeHolder argparse::_AttributeHolder argparse::_AttributeHolder

List of all members.

Public Member Functions

def __call__
def __call__
def __init__
def __init__

Public Attributes

 version

Detailed Description

Definition at line 997 of file argparse.py.


Constructor & Destructor Documentation

def argparse::_VersionAction::__init__ (   self,
  option_strings,
  version = None,
  dest = SUPPRESS,
  default = SUPPRESS,
  help = "show program's version number and exit" 
)

Definition at line 999 of file argparse.py.

01005                                                                :
01006         super(_VersionAction, self).__init__(
01007             option_strings=option_strings,
01008             dest=dest,
01009             default=default,
01010             nargs=0,
01011             help=help)
01012         self.version = version

def argparse::_VersionAction::__init__ (   self,
  option_strings,
  dest = SUPPRESS,
  default = SUPPRESS,
  help = None 
)

Definition at line 1011 of file argparse.py.

01015                            :
01016         super(_VersionAction, self).__init__(
01017             option_strings=option_strings,
01018             dest=dest,
01019             default=default,
01020             nargs=0,
01021             help=help)
01022 

Member Function Documentation

def argparse::_VersionAction::__call__ (   self,
  parser,
  namespace,
  values,
  option_string = None 
)

Reimplemented from argparse::Action.

Definition at line 1013 of file argparse.py.

01014                                                                      :
01015         version = self.version
01016         if version is None:
01017             version = parser.version
01018         formatter = parser._get_formatter()
01019         formatter.add_text(version)
01020         parser.exit(message=formatter.format_help())
01021 

def argparse::_VersionAction::__call__ (   self,
  parser,
  namespace,
  values,
  option_string = None 
)

Reimplemented from argparse::Action.

Definition at line 1023 of file argparse.py.

01023                                                                      :
01024         parser.print_version()
01025         parser.exit()
01026 
01027 

Member Data Documentation

Definition at line 999 of file argparse.py.