J
Josh English
I have a program with several cmd.Cmd instances. I am trying to figure out what the best way to organize them should be.
I've got my BossCmd, SubmissionCmd, and StoryCmd objects.
The BossCmd object can start either of the other two, and this module allows the user switch back and forth between them. Exiting either of the sub-command objects returns back to the BossCmd.
I have defined both a do_done and do_exit method on the sub-commands.
Is it possible to flag BossCmd so when either of the other two process do_exit, the BossCmd will also exit?
Josh
I've got my BossCmd, SubmissionCmd, and StoryCmd objects.
The BossCmd object can start either of the other two, and this module allows the user switch back and forth between them. Exiting either of the sub-command objects returns back to the BossCmd.
I have defined both a do_done and do_exit method on the sub-commands.
Is it possible to flag BossCmd so when either of the other two process do_exit, the BossCmd will also exit?
Josh