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 998 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 1000 of file argparse.py.

01006                                                                :
01007         super(_VersionAction, self).__init__(
01008             option_strings=option_strings,
01009             dest=dest,
01010             default=default,
01011             nargs=0,
01012             help=help)
01013         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 1014 of file argparse.py.

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

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 1000 of file argparse.py.