pimlico.cli.shell.base module

class ShellCommand[source]

Bases: object

Base class used to provide commands for exploring a particular datatype. A basic set of commands is provided for all datatypes, but specific datatype classes may provide their own, by overriding the shell_commands attribute.

commands = []
help_text = None
execute(shell, *args, **kwargs)[source]
class DataShell(data, commands, *args, **kwargs)[source]

Bases: cmd.Cmd

Terminal shell for querying datatypes.

prompt = '>>> '
get_names()[source]
do_EOF(line)[source]

Exits the shell

preloop()[source]
postloop()[source]
emptyline()[source]

Don’t repeat the last command (default): ignore empty lines

default(line)[source]

We use this to handle commands that can’t be handled using the do_ pattern. Also handles the default fallback, which is to execute Python.

cmdloop(intro=None)[source]
exception ShellError[source]

Bases: exceptions.Exception