While using python\'s cmd.Cmd to create a custom CLI, how do I tell the handler to abort the current line and give me a new prompt?
Here is a minimal example:
In response to the following comment in this answer:
This appears to be converging on a solution, but I don't know how to integrate it into my own code (above). I have to figure out the 'super' line. I need to try and get this working at some point in the future.
super()
would work in this answer if you have your class extend object
in addition to cmd.Cmd
. Like this:
class Console(cmd.Cmd, object):