I have a little cmd subclass:
class Foo(cmd.Cmd):
def do_ipdb(self, *a, **kw):
import ipdb; ipdb.set_trace()
pass
Foo().cmdloop()
This works and lets me inside ipdb, but when exiting, either using 'q' or CTRL-D, the cmdloop also breaks (which is not desired)
I tried wrapping the ipdb with a try / except, but I don't get to the except part. How can I maintain the cmdloop after exiting form ipdb?
BTW, I saw that cmd2 already does what I'm trying to do (with its default python
option), but I still wonder what is happening here in the old cmd