September 2026
1051 pages
35h 4m
English
The cmd module provides a simple and abstracted interface for writing a line-based command interpreter—cmd. A line-based command interpreter is an interactive console in which commands are entered line-by-line and interpreted immediately after the input has been confirmed. The interactive mode is a well-known example of such a command interpreter. In a separate project, cmd could be used for an administrator console, for example.
The cmd module contains the Cmd class, which can be used as a base class for your own command interpreters and provides a rough framework for doing so. Because Cmd is meant to be a base class, it makes no sense to instantiate the class directly. The following sample project uses the ...
Read now
Unlock full access