wormwood_3 wrote:
> 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) )
^^^^^^^^^^^^ <- this is white space in your string!
Try this:
logger.info("Checked %s records in %s seconds, yielding an \
average of \
%s seconds per record." % (len(self.data), duration, avgquery) )
Kent
_______________________________________________
Tutor maillist - [email protected]
http://mail.python.org/mailman/listinfo/tutor