implement rbsm writing for the python console
fix bug where command line was whipped before parsed