[cli/engine] use a new "traceback" output type for Python errors raised by commands
[cli/engine/commands/shell] fix an infinite loop bug