Mercurial > python-cmd2
annotate example/exampleSession.txt @ 169:429c8e984df4
all working, except \n\n terminators
author | catherine@dellzilla |
---|---|
date | Wed, 10 Dec 2008 14:50:42 -0500 |
parents | 786ab5a83eea |
children | c01f8e612a0a |
rev | line source |
---|---|
118
db366853074c
test transcript won't tolerate final prompt
catherine@dellzilla
parents:
117
diff
changeset
|
1 This is cut-and-pasted from an interactive example.py session. |
db366853074c
test transcript won't tolerate final prompt
catherine@dellzilla
parents:
117
diff
changeset
|
2 Calling `example.py -t` runs it as a series of unit tests, |
db366853074c
test transcript won't tolerate final prompt
catherine@dellzilla
parents:
117
diff
changeset
|
3 verifying that the same output is still returned. |
db366853074c
test transcript won't tolerate final prompt
catherine@dellzilla
parents:
117
diff
changeset
|
4 |
db366853074c
test transcript won't tolerate final prompt
catherine@dellzilla
parents:
117
diff
changeset
|
5 (Cmd) help |
db366853074c
test transcript won't tolerate final prompt
catherine@dellzilla
parents:
117
diff
changeset
|
6 |
db366853074c
test transcript won't tolerate final prompt
catherine@dellzilla
parents:
117
diff
changeset
|
7 Documented commands (type help <topic>): |
db366853074c
test transcript won't tolerate final prompt
catherine@dellzilla
parents:
117
diff
changeset
|
8 ======================================== |
db366853074c
test transcript won't tolerate final prompt
catherine@dellzilla
parents:
117
diff
changeset
|
9 _load edit history li load r save set shortcuts speak |
db366853074c
test transcript won't tolerate final prompt
catherine@dellzilla
parents:
117
diff
changeset
|
10 ed hi l list orate run say shell show |
db366853074c
test transcript won't tolerate final prompt
catherine@dellzilla
parents:
117
diff
changeset
|
11 |
db366853074c
test transcript won't tolerate final prompt
catherine@dellzilla
parents:
117
diff
changeset
|
12 Undocumented commands: |
db366853074c
test transcript won't tolerate final prompt
catherine@dellzilla
parents:
117
diff
changeset
|
13 ====================== |
db366853074c
test transcript won't tolerate final prompt
catherine@dellzilla
parents:
117
diff
changeset
|
14 EOF cmdenvironment eof exit help q quit |
db366853074c
test transcript won't tolerate final prompt
catherine@dellzilla
parents:
117
diff
changeset
|
15 |
db366853074c
test transcript won't tolerate final prompt
catherine@dellzilla
parents:
117
diff
changeset
|
16 (Cmd) help say |
db366853074c
test transcript won't tolerate final prompt
catherine@dellzilla
parents:
117
diff
changeset
|
17 Repeats what you tell me to. |
db366853074c
test transcript won't tolerate final prompt
catherine@dellzilla
parents:
117
diff
changeset
|
18 Usage: speak [options] arg |
db366853074c
test transcript won't tolerate final prompt
catherine@dellzilla
parents:
117
diff
changeset
|
19 |
db366853074c
test transcript won't tolerate final prompt
catherine@dellzilla
parents:
117
diff
changeset
|
20 Options: |
db366853074c
test transcript won't tolerate final prompt
catherine@dellzilla
parents:
117
diff
changeset
|
21 -h, --help show this help message and exit |
db366853074c
test transcript won't tolerate final prompt
catherine@dellzilla
parents:
117
diff
changeset
|
22 -p, --piglatin atinLay |
db366853074c
test transcript won't tolerate final prompt
catherine@dellzilla
parents:
117
diff
changeset
|
23 -s, --shout N00B EMULATION MODE |
db366853074c
test transcript won't tolerate final prompt
catherine@dellzilla
parents:
117
diff
changeset
|
24 -r REPEAT, --repeat=REPEAT |
db366853074c
test transcript won't tolerate final prompt
catherine@dellzilla
parents:
117
diff
changeset
|
25 output [n] times |
db366853074c
test transcript won't tolerate final prompt
catherine@dellzilla
parents:
117
diff
changeset
|
26 |
db366853074c
test transcript won't tolerate final prompt
catherine@dellzilla
parents:
117
diff
changeset
|
27 (Cmd) say goodnight, Gracie |
db366853074c
test transcript won't tolerate final prompt
catherine@dellzilla
parents:
117
diff
changeset
|
28 goodnight, Gracie |
db366853074c
test transcript won't tolerate final prompt
catherine@dellzilla
parents:
117
diff
changeset
|
29 (Cmd) say -ps --repeat=5 goodnight, Gracie |
db366853074c
test transcript won't tolerate final prompt
catherine@dellzilla
parents:
117
diff
changeset
|
30 OODNIGHT, GRACIEGAY |
db366853074c
test transcript won't tolerate final prompt
catherine@dellzilla
parents:
117
diff
changeset
|
31 OODNIGHT, GRACIEGAY |
db366853074c
test transcript won't tolerate final prompt
catherine@dellzilla
parents:
117
diff
changeset
|
32 OODNIGHT, GRACIEGAY |
db366853074c
test transcript won't tolerate final prompt
catherine@dellzilla
parents:
117
diff
changeset
|
33 (Cmd) set |
db366853074c
test transcript won't tolerate final prompt
catherine@dellzilla
parents:
117
diff
changeset
|
34 prompt: (Cmd) |
db366853074c
test transcript won't tolerate final prompt
catherine@dellzilla
parents:
117
diff
changeset
|
35 editor: gedit |
db366853074c
test transcript won't tolerate final prompt
catherine@dellzilla
parents:
117
diff
changeset
|
36 echo: False |
db366853074c
test transcript won't tolerate final prompt
catherine@dellzilla
parents:
117
diff
changeset
|
37 maxrepeats: 3 |
db366853074c
test transcript won't tolerate final prompt
catherine@dellzilla
parents:
117
diff
changeset
|
38 (Cmd) set maxrepeats 5 |
db366853074c
test transcript won't tolerate final prompt
catherine@dellzilla
parents:
117
diff
changeset
|
39 maxrepeats - was: 3 |
db366853074c
test transcript won't tolerate final prompt
catherine@dellzilla
parents:
117
diff
changeset
|
40 now: 5 |
db366853074c
test transcript won't tolerate final prompt
catherine@dellzilla
parents:
117
diff
changeset
|
41 (Cmd) say -ps --repeat=5 goodnight, Gracie |
db366853074c
test transcript won't tolerate final prompt
catherine@dellzilla
parents:
117
diff
changeset
|
42 OODNIGHT, GRACIEGAY |
db366853074c
test transcript won't tolerate final prompt
catherine@dellzilla
parents:
117
diff
changeset
|
43 OODNIGHT, GRACIEGAY |
db366853074c
test transcript won't tolerate final prompt
catherine@dellzilla
parents:
117
diff
changeset
|
44 OODNIGHT, GRACIEGAY |
db366853074c
test transcript won't tolerate final prompt
catherine@dellzilla
parents:
117
diff
changeset
|
45 OODNIGHT, GRACIEGAY |
db366853074c
test transcript won't tolerate final prompt
catherine@dellzilla
parents:
117
diff
changeset
|
46 OODNIGHT, GRACIEGAY |
db366853074c
test transcript won't tolerate final prompt
catherine@dellzilla
parents:
117
diff
changeset
|
47 (Cmd) hi |
db366853074c
test transcript won't tolerate final prompt
catherine@dellzilla
parents:
117
diff
changeset
|
48 -------------------------[1] |
db366853074c
test transcript won't tolerate final prompt
catherine@dellzilla
parents:
117
diff
changeset
|
49 help |
db366853074c
test transcript won't tolerate final prompt
catherine@dellzilla
parents:
117
diff
changeset
|
50 -------------------------[2] |
db366853074c
test transcript won't tolerate final prompt
catherine@dellzilla
parents:
117
diff
changeset
|
51 help say |
db366853074c
test transcript won't tolerate final prompt
catherine@dellzilla
parents:
117
diff
changeset
|
52 -------------------------[3] |
db366853074c
test transcript won't tolerate final prompt
catherine@dellzilla
parents:
117
diff
changeset
|
53 say goodnight, Gracie |
db366853074c
test transcript won't tolerate final prompt
catherine@dellzilla
parents:
117
diff
changeset
|
54 -------------------------[4] |
db366853074c
test transcript won't tolerate final prompt
catherine@dellzilla
parents:
117
diff
changeset
|
55 say -ps --repeat=5 goodnight, Gracie |
db366853074c
test transcript won't tolerate final prompt
catherine@dellzilla
parents:
117
diff
changeset
|
56 -------------------------[5] |
db366853074c
test transcript won't tolerate final prompt
catherine@dellzilla
parents:
117
diff
changeset
|
57 set |
db366853074c
test transcript won't tolerate final prompt
catherine@dellzilla
parents:
117
diff
changeset
|
58 -------------------------[6] |
db366853074c
test transcript won't tolerate final prompt
catherine@dellzilla
parents:
117
diff
changeset
|
59 set maxrepeats 5 |
db366853074c
test transcript won't tolerate final prompt
catherine@dellzilla
parents:
117
diff
changeset
|
60 -------------------------[7] |
db366853074c
test transcript won't tolerate final prompt
catherine@dellzilla
parents:
117
diff
changeset
|
61 say -ps --repeat=5 goodnight, Gracie |
133
31674148b13c
just beginning to make comments work
catherine@Elli.myhome.westell.com
parents:
118
diff
changeset
|
62 (Cmd) hi 3 |
31674148b13c
just beginning to make comments work
catherine@Elli.myhome.westell.com
parents:
118
diff
changeset
|
63 -------------------------[3] |
31674148b13c
just beginning to make comments work
catherine@Elli.myhome.westell.com
parents:
118
diff
changeset
|
64 say goodnight, Gracie |
31674148b13c
just beginning to make comments work
catherine@Elli.myhome.westell.com
parents:
118
diff
changeset
|
65 (Cmd) history notappearinginthisfilm |
31674148b13c
just beginning to make comments work
catherine@Elli.myhome.westell.com
parents:
118
diff
changeset
|
66 (Cmd) history goodnight |
31674148b13c
just beginning to make comments work
catherine@Elli.myhome.westell.com
parents:
118
diff
changeset
|
67 -------------------------[3] |
31674148b13c
just beginning to make comments work
catherine@Elli.myhome.westell.com
parents:
118
diff
changeset
|
68 say goodnight, Gracie |
31674148b13c
just beginning to make comments work
catherine@Elli.myhome.westell.com
parents:
118
diff
changeset
|
69 -------------------------[4] |
31674148b13c
just beginning to make comments work
catherine@Elli.myhome.westell.com
parents:
118
diff
changeset
|
70 say -ps --repeat=5 goodnight, Gracie |
31674148b13c
just beginning to make comments work
catherine@Elli.myhome.westell.com
parents:
118
diff
changeset
|
71 -------------------------[7] |
31674148b13c
just beginning to make comments work
catherine@Elli.myhome.westell.com
parents:
118
diff
changeset
|
72 say -ps --repeat=5 goodnight, Gracie |
118
db366853074c
test transcript won't tolerate final prompt
catherine@dellzilla
parents:
117
diff
changeset
|
73 (Cmd) run 4 |
db366853074c
test transcript won't tolerate final prompt
catherine@dellzilla
parents:
117
diff
changeset
|
74 say -ps --repeat=5 goodnight, Gracie |
db366853074c
test transcript won't tolerate final prompt
catherine@dellzilla
parents:
117
diff
changeset
|
75 OODNIGHT, GRACIEGAY |
db366853074c
test transcript won't tolerate final prompt
catherine@dellzilla
parents:
117
diff
changeset
|
76 OODNIGHT, GRACIEGAY |
db366853074c
test transcript won't tolerate final prompt
catherine@dellzilla
parents:
117
diff
changeset
|
77 OODNIGHT, GRACIEGAY |
db366853074c
test transcript won't tolerate final prompt
catherine@dellzilla
parents:
117
diff
changeset
|
78 OODNIGHT, GRACIEGAY |
db366853074c
test transcript won't tolerate final prompt
catherine@dellzilla
parents:
117
diff
changeset
|
79 OODNIGHT, GRACIEGAY |
156 | 80 (Cmd) orate four score and |
117
33cd0e1bebb8
stripping continuation prompts during testing
catherine@dellzilla
parents:
115
diff
changeset
|
81 > seven releases ago |
33cd0e1bebb8
stripping continuation prompts during testing
catherine@dellzilla
parents:
115
diff
changeset
|
82 > our BDFL |
33cd0e1bebb8
stripping continuation prompts during testing
catherine@dellzilla
parents:
115
diff
changeset
|
83 > |
33cd0e1bebb8
stripping continuation prompts during testing
catherine@dellzilla
parents:
115
diff
changeset
|
84 > |
166
a3414ac38677
so close - now problem with terminator in string
catherine@dellzilla
parents:
156
diff
changeset
|
85 four score and |
a3414ac38677
so close - now problem with terminator in string
catherine@dellzilla
parents:
156
diff
changeset
|
86 seven releases ago |
a3414ac38677
so close - now problem with terminator in string
catherine@dellzilla
parents:
156
diff
changeset
|
87 our BDFL |
118
db366853074c
test transcript won't tolerate final prompt
catherine@dellzilla
parents:
117
diff
changeset
|
88 (Cmd) & look, a shortcut! |
db366853074c
test transcript won't tolerate final prompt
catherine@dellzilla
parents:
117
diff
changeset
|
89 look, a shortcut! |
db366853074c
test transcript won't tolerate final prompt
catherine@dellzilla
parents:
117
diff
changeset
|
90 (Cmd) say put this in a file > myfile.txt |
db366853074c
test transcript won't tolerate final prompt
catherine@dellzilla
parents:
117
diff
changeset
|
91 (Cmd) say < myfile.txt |
db366853074c
test transcript won't tolerate final prompt
catherine@dellzilla
parents:
117
diff
changeset
|
92 put this in a file |
139 | 93 (Cmd) # comments do nothing |
94 (Cmd) /* C-style comments */ say are invisible | |
95 are invisible | |
169 | 96 (Cmd) orate and they do not /* interfere; |
139 | 97 > with multiline */ commands; |
169 | 98 and they do not commands |
99 (Cmd) speak the /* hidden comment */ text | |
100 the text | |
101 (Cmd) speak the "unhidden quote" text | |
102 the "unhidden quote" text | |
103 (Cmd) # Quoted strings immediately following the command are NOT included in the arguments - | |
104 (Cmd) # this is due to a bug in pyparsing. See: | |
105 (Cmd) # https://sourceforge.net/tracker/index.php?func=detail&aid=2412233&group_id=97203&atid=617311 | |
118
db366853074c
test transcript won't tolerate final prompt
catherine@dellzilla
parents:
117
diff
changeset
|
106 (Cmd) set prompt "---> " |
db366853074c
test transcript won't tolerate final prompt
catherine@dellzilla
parents:
117
diff
changeset
|
107 prompt - was: (Cmd) |
db366853074c
test transcript won't tolerate final prompt
catherine@dellzilla
parents:
117
diff
changeset
|
108 now: ---> |
db366853074c
test transcript won't tolerate final prompt
catherine@dellzilla
parents:
117
diff
changeset
|
109 ---> say goodbye |
db366853074c
test transcript won't tolerate final prompt
catherine@dellzilla
parents:
117
diff
changeset
|
110 goodbye |