Mercurial > python-cmd2
annotate example/exampleSession.txt @ 150:cc569f68a478
all but ignore seems to work
author | catherine@dellzilla |
---|---|
date | Thu, 20 Nov 2008 16:35:35 -0500 |
parents | e2d06e53d09c |
children | 7e5a57df88aa |
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 |
117
33cd0e1bebb8
stripping continuation prompts during testing
catherine@dellzilla
parents:
115
diff
changeset
|
80 (Cmd) orate Four score and |
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 > blah blah blah |
33cd0e1bebb8
stripping continuation prompts during testing
catherine@dellzilla
parents:
115
diff
changeset
|
84 > |
33cd0e1bebb8
stripping continuation prompts during testing
catherine@dellzilla
parents:
115
diff
changeset
|
85 > |
118
db366853074c
test transcript won't tolerate final prompt
catherine@dellzilla
parents:
117
diff
changeset
|
86 Four score and seven releases ago our BDFL blah blah blah |
db366853074c
test transcript won't tolerate final prompt
catherine@dellzilla
parents:
117
diff
changeset
|
87 (Cmd) & look, a shortcut! |
db366853074c
test transcript won't tolerate final prompt
catherine@dellzilla
parents:
117
diff
changeset
|
88 look, a shortcut! |
db366853074c
test transcript won't tolerate final prompt
catherine@dellzilla
parents:
117
diff
changeset
|
89 (Cmd) say put this in a file > myfile.txt |
db366853074c
test transcript won't tolerate final prompt
catherine@dellzilla
parents:
117
diff
changeset
|
90 (Cmd) say < myfile.txt |
db366853074c
test transcript won't tolerate final prompt
catherine@dellzilla
parents:
117
diff
changeset
|
91 put this in a file |
139 | 92 (Cmd) # comments do nothing |
93 (Cmd) /* C-style comments */ say are invisible | |
94 are invisible | |
95 (Cmd) orate and they don't /* interfere; | |
96 > with multiline */ commands; | |
97 and they don't commands; | |
118
db366853074c
test transcript won't tolerate final prompt
catherine@dellzilla
parents:
117
diff
changeset
|
98 (Cmd) set prompt "---> " |
db366853074c
test transcript won't tolerate final prompt
catherine@dellzilla
parents:
117
diff
changeset
|
99 prompt - was: (Cmd) |
db366853074c
test transcript won't tolerate final prompt
catherine@dellzilla
parents:
117
diff
changeset
|
100 now: ---> |
db366853074c
test transcript won't tolerate final prompt
catherine@dellzilla
parents:
117
diff
changeset
|
101 ---> say goodbye |
db366853074c
test transcript won't tolerate final prompt
catherine@dellzilla
parents:
117
diff
changeset
|
102 goodbye |