annotate docs/index.rst @ 366:40cba30b6125

refresh corrections
author cat@eee
date Thu, 18 Feb 2010 14:20:43 -0500
parents 29221236d1a1
children 2d244d7a675b
rev   line source
314
0687bb650118 begin new docs
catherine@dellzilla
parents:
diff changeset
1 .. cmd2 documentation master file, created by
0687bb650118 begin new docs
catherine@dellzilla
parents:
diff changeset
2 sphinx-quickstart on Wed Feb 10 12:05:28 2010.
0687bb650118 begin new docs
catherine@dellzilla
parents:
diff changeset
3 You can adapt this file completely to your liking, but it should at least
0687bb650118 begin new docs
catherine@dellzilla
parents:
diff changeset
4 contain the root `toctree` directive.
0687bb650118 begin new docs
catherine@dellzilla
parents:
diff changeset
5
358
70fead908abe add info re: assembla page
catherine@Drou
parents: 332
diff changeset
6 cmd2
70fead908abe add info re: assembla page
catherine@Drou
parents: 332
diff changeset
7 ====
70fead908abe add info re: assembla page
catherine@Drou
parents: 332
diff changeset
8
359
5b95dacca46e remove ex2
catherine@Drou
parents: 358
diff changeset
9 A python package for building powerful command-line interpreter (CLI)
5b95dacca46e remove ex2
catherine@Drou
parents: 358
diff changeset
10 programs. Extends the Python Standard Library's cmd_ package.
5b95dacca46e remove ex2
catherine@Drou
parents: 358
diff changeset
11
364
29221236d1a1 updating refresh scripts
cat@eee
parents: 359
diff changeset
12
29221236d1a1 updating refresh scripts
cat@eee
parents: 359
diff changeset
13 .. _`cmd2 project page`: http://www.assembla.com/wiki/show/python-cmd2
29221236d1a1 updating refresh scripts
cat@eee
parents: 359
diff changeset
14 .. _`project bug tracker`: http://trac-hg.assembla.com/python-cmd2/report/1
29221236d1a1 updating refresh scripts
cat@eee
parents: 359
diff changeset
15
359
5b95dacca46e remove ex2
catherine@Drou
parents: 358
diff changeset
16 .. _cmd: http://docs.python.org/library/cmd.html#module-cmd
5b95dacca46e remove ex2
catherine@Drou
parents: 358
diff changeset
17
364
29221236d1a1 updating refresh scripts
cat@eee
parents: 359
diff changeset
18 .. _`PyCon 2010 presentation`: http://catherinedevlin.pythoneers.com/presentations/cmd_cmd2/pycon2010.html
314
0687bb650118 begin new docs
catherine@dellzilla
parents:
diff changeset
19
324
21584174d865 make SHOW TABLES work
catherine@dellzilla
parents: 315
diff changeset
20 The basic use of ``cmd2`` is identical to that of cmd_.
21584174d865 make SHOW TABLES work
catherine@dellzilla
parents: 315
diff changeset
21
21584174d865 make SHOW TABLES work
catherine@dellzilla
parents: 315
diff changeset
22 1. Create a subclass of ``cmd2.Cmd``. Define attributes and
21584174d865 make SHOW TABLES work
catherine@dellzilla
parents: 315
diff changeset
23 ``do_*`` methods to control its behavior. Throughout this documentation,
21584174d865 make SHOW TABLES work
catherine@dellzilla
parents: 315
diff changeset
24 we will assume that you are naming your subclass ``App``::
21584174d865 make SHOW TABLES work
catherine@dellzilla
parents: 315
diff changeset
25
21584174d865 make SHOW TABLES work
catherine@dellzilla
parents: 315
diff changeset
26 from cmd2 import Cmd
21584174d865 make SHOW TABLES work
catherine@dellzilla
parents: 315
diff changeset
27 class App(Cmd):
21584174d865 make SHOW TABLES work
catherine@dellzilla
parents: 315
diff changeset
28 # customized attributes and methods here
21584174d865 make SHOW TABLES work
catherine@dellzilla
parents: 315
diff changeset
29
21584174d865 make SHOW TABLES work
catherine@dellzilla
parents: 315
diff changeset
30 2. Instantiate ``App`` and start the command loop::
21584174d865 make SHOW TABLES work
catherine@dellzilla
parents: 315
diff changeset
31
21584174d865 make SHOW TABLES work
catherine@dellzilla
parents: 315
diff changeset
32 app = App()
21584174d865 make SHOW TABLES work
catherine@dellzilla
parents: 315
diff changeset
33 app.cmdloop()
332
49bea7cab179 doc refreshing refresh.bash
cat@eee
parents: 324
diff changeset
34
364
29221236d1a1 updating refresh scripts
cat@eee
parents: 359
diff changeset
35 Resources
29221236d1a1 updating refresh scripts
cat@eee
parents: 359
diff changeset
36 ---------
29221236d1a1 updating refresh scripts
cat@eee
parents: 359
diff changeset
37
29221236d1a1 updating refresh scripts
cat@eee
parents: 359
diff changeset
38 * cmd_
29221236d1a1 updating refresh scripts
cat@eee
parents: 359
diff changeset
39 * `project bug tracker`_
29221236d1a1 updating refresh scripts
cat@eee
parents: 359
diff changeset
40 * `cmd2 project page`_
366
40cba30b6125 refresh corrections
cat@eee
parents: 364
diff changeset
41 * `PyCon 2010 presentation`_: Easy Command-Line Applications with cmd and cmd2
364
29221236d1a1 updating refresh scripts
cat@eee
parents: 359
diff changeset
42
332
49bea7cab179 doc refreshing refresh.bash
cat@eee
parents: 324
diff changeset
43 These docs will refer to ``App`` as your ``cmd2.Cmd``
49bea7cab179 doc refreshing refresh.bash
cat@eee
parents: 324
diff changeset
44 subclass, and ``app`` as an instance of ``App``. Of
49bea7cab179 doc refreshing refresh.bash
cat@eee
parents: 324
diff changeset
45 course, in your program, you may name them whatever
49bea7cab179 doc refreshing refresh.bash
cat@eee
parents: 324
diff changeset
46 you want.
324
21584174d865 make SHOW TABLES work
catherine@dellzilla
parents: 315
diff changeset
47
314
0687bb650118 begin new docs
catherine@dellzilla
parents:
diff changeset
48 Contents:
0687bb650118 begin new docs
catherine@dellzilla
parents:
diff changeset
49
0687bb650118 begin new docs
catherine@dellzilla
parents:
diff changeset
50 .. toctree::
0687bb650118 begin new docs
catherine@dellzilla
parents:
diff changeset
51 :maxdepth: 2
0687bb650118 begin new docs
catherine@dellzilla
parents:
diff changeset
52
0687bb650118 begin new docs
catherine@dellzilla
parents:
diff changeset
53 overview
0687bb650118 begin new docs
catherine@dellzilla
parents:
diff changeset
54 example
0687bb650118 begin new docs
catherine@dellzilla
parents:
diff changeset
55 freefeatures
315
a08c50b7d3d3 doc skeleton
cat@eee
parents: 314
diff changeset
56 settingchanges
a08c50b7d3d3 doc skeleton
cat@eee
parents: 314
diff changeset
57 unfreefeatures
314
0687bb650118 begin new docs
catherine@dellzilla
parents:
diff changeset
58
0687bb650118 begin new docs
catherine@dellzilla
parents:
diff changeset
59 Indices and tables
0687bb650118 begin new docs
catherine@dellzilla
parents:
diff changeset
60 ==================
0687bb650118 begin new docs
catherine@dellzilla
parents:
diff changeset
61
0687bb650118 begin new docs
catherine@dellzilla
parents:
diff changeset
62 * :ref:`genindex`
0687bb650118 begin new docs
catherine@dellzilla
parents:
diff changeset
63 * :ref:`modindex`
0687bb650118 begin new docs
catherine@dellzilla
parents:
diff changeset
64 * :ref:`search`
0687bb650118 begin new docs
catherine@dellzilla
parents:
diff changeset
65