python: Make gdb.execute("show commands") work (PR 23669)