Skip to content

Quit command doesn't really quit when issued from within a python script #66

@tleonhardt

Description

@tleonhardt

In general, all cmd2 commands are scriptable within a Python script via "cmd('command args')". However, since when running within a Python script we are actually within the do_py command, quit doesn't actually quit the cmd2 application.

The current behavior is non-intuitive. Issuing a cmd('quit') should really quit.

Add code like the following to do_quit() and do_py():

def do_quit(self):
    self._should_quit = True

def do_py(self):
    ...
    return self._should_quit

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions