TheCmd class provides a simple framework for writingline-oriented command interpreters. These are often useful fortest harnesses, administrative tools, and prototypes that willlater be wrapped in a more sophisticated interface.
| [completekey[, stdin[, stdout]]]) |
The optional argumentcompletekey is thereadline nameof a completion key; it defaults toTab. Ifcompletekey isnotNone andreadline is available, command completionis done automatically.
The optional argumentsstdin andstdout specify the input and output file objects that the Cmd instance or subclass instance will use for input and output. If not specified, theywill default tosys.stdin andsys.stdout.
Changed in version 2.3:Thestdin andstdout parameters were added.