summaryrefslogtreecommitdiff
path: root/doxygen/man/man3/example_CmdLineApp.3
blob: 0e6fe2cebc0ee81b30fc30a76643222f4f7f0fcd (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
83
84
85
86
87
88
89
90
91
92
93
94
95
.TH "example::CmdLineApp" 3 "Fri Sep 9 2011" "Cmd2" \" -*- nroff -*-
.ad l
.nh
.SH NAME
example::CmdLineApp \- 
.SH SYNOPSIS
.br
.PP
.PP
Inherits \fBcmd2::Cmd\fP'\&.
.SS "Public Member Functions"

.in +1c
.ti -1c
.RI "def \fBdo_speak\fP"
.br
.in -1c
.SS "Static Public Attributes"

.in +1c
.ti -1c
.RI "\fBdo_orate\fP = do_speak"
.br
.ti -1c
.RI "\fBdo_say\fP = do_speak"
.br
.ti -1c
.RI "int \fBmaxrepeats\fP = 3"
.br
.ti -1c
.RI "list \fBmultilineCommands\fP = ['orate']"
.br
.ti -1c
.RI "string \fBredirector\fP = '->'"
.br
.in -1c
.SH "Detailed Description"
.PP 
Definition at line 6 of file example\&.py'\&.
.SH "Member Function Documentation"
.PP 
.SS "def example::CmdLineApp::do_speak (self, arg, opts = \fCNone\fP)".PP
.nf
Repeats what you tell me to..fi
.PP
 
.PP
Definition at line 17 of file example\&.py'\&.
.PP
References maxrepeats\&.
.PP
.nf
17 
18     def do_speak(self, arg, opts=None):
19         '''Repeats what you tell me to\&.'''
20         arg = ''\&.join(arg)
21         if opts\&.piglatin:
22             arg = '%s%say' % (arg[1:]\&.rstrip(), arg[0])
23         if opts\&.shout:
24             arg = arg\&.upper()
25         repetitions = opts\&.repeat or 1
26         for i in range(min(repetitions, self\&.maxrepeats)):
27             self\&.stdout\&.write(arg)
28             self\&.stdout\&.write('\n')
29             # self\&.stdout\&.write is better than 'print', because Cmd can be
30             # initialized with a non-standard output destination        

.fi
.SH "Member Data Documentation"
.PP 
.SS "\fBexample::CmdLineApp::do_orate\fP = do_speak\fC [static]\fP"
.PP
Definition at line 32 of file example\&.py'\&.
.SS "\fBexample::CmdLineApp::do_say\fP = do_speak\fC [static]\fP"
.PP
Definition at line 31 of file example\&.py'\&.
.SS "int \fBexample::CmdLineApp::maxrepeats\fP = 3\fC [static]\fP"
.PP
Definition at line 9 of file example\&.py'\&.
.PP
Referenced by do_speak()\&.
.SS "list \fBexample::CmdLineApp::multilineCommands\fP = ['orate']\fC [static]\fP"
.PP
Reimplemented from \fBcmd2::Cmd\fP'\&.
.PP
Definition at line 7 of file example\&.py'\&.
.SS "string \fBexample::CmdLineApp::redirector\fP = '->'\fC [static]\fP"
.PP
Reimplemented from \fBcmd2::Cmd\fP'\&.
.PP
Definition at line 10 of file example\&.py'\&.

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