summaryrefslogtreecommitdiff
path: root/doxygen/man/man3/cmd2_OptionParser.3
blob: 15d1f0a0b590d65be3da86d1756aeeefb17d244c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
.TH "cmd2::OptionParser" 3 "Fri Sep 9 2011" "Cmd2" \" -*- nroff -*-
.ad l
.nh
.SH NAME
cmd2::OptionParser \- 
.SH SYNOPSIS
.br
.PP
.SS "Public Member Functions"

.in +1c
.ti -1c
.RI "def \fBerror\fP"
.br
.ti -1c
.RI "def \fBexit\fP"
.br
.ti -1c
.RI "def \fBprint_help\fP"
.br
.in -1c
.SH "Detailed Description"
.PP 
Definition at line 64 of file cmd2\&.py'\&.
.SH "Member Function Documentation"
.PP 
.SS "def cmd2::OptionParser::error (self, msg)".PP
.nf
error(msg : string)

Print a usage message incorporating 'msg' to stderr and exit.
If you override this in a subclass, it should not return -- it
should either exit or raise an exception.
.fi
.PP
 
.PP
Definition at line 77 of file cmd2\&.py'\&.
.PP
.nf
77 
78     def error(self, msg):
79         '''error(msg : string)
80 
81         Print a usage message incorporating 'msg' to stderr and exit\&.
82         If you override this in a subclass, it should not return -- it
83         should either exit or raise an exception\&.
84         '''
85         raise optparse\&.OptParseError(msg)
        
.fi
.SS "def cmd2::OptionParser::exit (self, status = \fC0\fP, msg = \fCNone\fP)"
.PP
Definition at line 65 of file cmd2\&.py'\&.
.PP
.nf
65 
66     def exit(self, status=0, msg=None):
67         self\&.values\&._exit = True
68         if msg:
69             print (msg)
            
.fi
.SS "def cmd2::OptionParser::print_help (self, args, kwargs)"
.PP
Definition at line 70 of file cmd2\&.py'\&.
.PP
.nf
70 
71     def print_help(self, *args, **kwargs):
72         try:
73             print (self\&._func\&.__doc__)
74         except AttributeError:
75             pass
76         optparse\&.OptionParser\&.print_help(self, *args, **kwargs)

.fi


.SH "Author"
.PP 
Generated automatically by Doxygen for Cmd2 from the source code'\&.