Previous: 5.13 calendar Up: 5. Miscellaneous Services Next: 5.14.1 Cmd Objects

5.14 cmd -- Support for line-oriented command interpreters

The Cmd class provides a simple framework for writing line-oriented command interpreters. These are often useful for test harnesses, administrative tools, and prototypes that will later be wrapped in a more sophisticated interface.

class Cmd ([completekey])
A Cmd instance or subclass instance is a line-oriented interpreter framework. There is no good reason to instantiate Cmd itself; rather, it's useful as a superclass of an interpreter class you define yourself in order to inherit Cmd's methods and encapsulate action methods.

The optional argument is the readline name of a completion key; it defaults to Tab. If completekey is not None and readline is available, command completion is done automatically.


Subsections


Previous: 5.13 calendar Up: 5. Miscellaneous Services Next: 5.14.1 Cmd Objects
Release 2.2.3, documentation updated on 30 May 2003.
See About this document... for information on suggesting changes.

AltStyle によって変換されたページ (->オリジナル) /