qmp: make qmp-shell work with python3