Changeset 391 for python/trunk/Doc/library/cmd.rst
- Timestamp:
- Mar 19, 2014, 11:31:01 PM (11 years ago)
- Location:
- python/trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
python/trunk
-
Property svn:mergeinfo
set to
/python/vendor/Python-2.7.6 merged eligible /python/vendor/current merged eligible
-
Property svn:mergeinfo
set to
-
python/trunk/Doc/library/cmd.rst
r2 r391 1 2 1 :mod:`cmd` --- Support for line-oriented command interpreters 3 2 ============================================================= … … 7 6 .. sectionauthor:: Eric S. Raymond <esr@snark.thyrsus.com> 8 7 8 **Source code:** :source:`Lib/cmd.py` 9 10 -------------- 9 11 10 12 The :class:`Cmd` class provides a simple framework for writing line-oriented … … 13 15 interface. 14 16 15 16 17 .. class:: Cmd([completekey[, stdin[, stdout]]]) 17 18 … … 53 54 54 55 The optional argument is a banner or intro string to be issued before the first 55 prompt (this overrides the :attr:`intro` class member).56 prompt (this overrides the :attr:`intro` class attribute). 56 57 57 58 If the :mod:`readline` module is loaded, input will automatically inherit … … 81 82 provide different completion depending upon which position the argument is in. 82 83 83 All subclasses of :class:`Cmd` inherit a predefined :meth:`do_help`. This84 All subclasses of :class:`Cmd` inherit a predefined :meth:`do_help`. This 84 85 method, called with an argument ``'bar'``, invokes the corresponding method 85 :meth:`help_bar`. With no argument, :meth:`do_help` lists all available help 86 topics (that is, all commands with corresponding :meth:`help_\*` methods), and 87 also lists any undocumented commands. 86 :meth:`help_bar`, and if that is not present, prints the docstring of 87 :meth:`do_bar`, if available. With no argument, :meth:`do_help` lists all 88 available help topics (that is, all commands with corresponding 89 :meth:`help_\*` methods or commands that have docstrings), and also lists any 90 undocumented commands. 88 91 89 92
Note:
See TracChangeset
for help on using the changeset viewer.