Skip to main content

A Cmd-based framework for writing line-oriented command interpreters.

Project description


enhterm is Cmd-based framework for writing line-oriented command interpreters.

It provides a class that extends cmd.Cmd and which is also intended to be inherited by a user class to create a shell.

Functionality provided by this package is split among mixins, allowing you to construct your own base class if EnhTerm is not suitable.

As with cmd.Cmd, the class constructed as described above can be used like so:

from enhterm import EnhTerm
class ExampleShell(EnhTerm):

if __name__ == '__main__':

What is included

Each of the elements below are implemented in a distinct "mixin" class, which mean that you can create your own combination using EnhTerm class as a template.


Allows python strings to be executed as if the user typed the input at the prompt. This is the base for executing commands in a file.


Provides the exit command that terminates command loop.


Provides the help command which prints information about the use of the command while accounting for custom commands and shortcuts.

Log Level

Allows changing logging verbosity by issuing commands like set loglevel debug.


Can record, remove, list and execute previously recorded commands.


Does not expose any commands but provides the class with a standardized way of issuing messages distinct from the logging mechanism.


Allows executing multiple commands from a string or from a file.


Commands are usually identified by using the first word the user types. This mixin allows for a more natural way of issuing commands like new macro instead of macro new. Other mixins then add subcommands in their __init__ method.

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for enhterm, version 0.1.0
Filename, size File type Python version Upload date Hashes
Filename, size enhterm-0.1.0-py3.7.egg (29.0 kB) File type Egg Python version 3.7 Upload date Hashes View
Filename, size enhterm-0.1.0.tar.gz (11.6 kB) File type Source Python version None Upload date Hashes View

Supported by

Pingdom Pingdom Monitoring Google Google Object Storage and Download Analytics Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page