python printing fixes