Sent this almost an hour ago, did not get it from the list yet. No idea why, but sending again... --------------------------
Hello tutors, I am adding logging to a program I am writing. I have some messages I want to log that are rather long. The problem I am running into is that when the line is more than the 80 character line recommendation and I split it across 2 lines with "\", the output is affected. Example code: logger.info("Checked %s records in %s seconds, yielding an average of \ %s seconds per record." % (len(self.data), duration, avgquery) ) The current output: 2007-10-07 14:49:42,902 - ipinfo - INFO - Checked 4 records in 0.0698790550232 seconds, yielding an average of 0.0174697637558 seconds per record. Desired output would be: 2007-10-07 14:49:42,902 - ipinfo - INFO - Checked 4 records in 0.0698790550232 seconds, yielding an average of 0.0174697637558 seconds per record. So what is the best way to break long code lines and still preserve desired output? Thanks, Sam _______________________________________________ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor