qapi: convert to use python print function instead of statement