Re: [Tutor] Logging with proper format

2007-10-08 Thread Eric Brunson
Kent Johnson wrote: > Eric Brunson wrote: > >> claxo wrote: >> >>> dont indent the line after '\', that means 0 indent >>> >>> s = 'hello\ >>> boy' >>> >>> >> Or, arguably better: >> >> s = '''hello >> boy''' >> > > That is a different string, it contains a newline, the origi

Re: [Tutor] Logging with proper format

2007-10-07 Thread Eike Welk
On Sunday 07 October 2007 22:32, Kent Johnson wrote: > Eric Brunson wrote: > > claxo wrote: > >> dont indent the line after '\', that means 0 indent > >> > >> s = 'hello\ > >> boy' > > > > Or, arguably better: > > > > s = '''hello > > boy''' > And there is even a third way:-) >>> s = "hello " \ .

Re: [Tutor] Logging with proper format

2007-10-07 Thread R. Alan Monroe
> logger.info("Checked %s records in %s seconds, yielding an average of > \ > %s seconds per record." % (len(self.data), duration, avgquery) ) ^ Remove these spaces. It makes the source code look weird, but the output will be correct. Alan _

Re: [Tutor] Logging with proper format

2007-10-07 Thread Kent Johnson
Eric Brunson wrote: > claxo wrote: >> dont indent the line after '\', that means 0 indent >> >> s = 'hello\ >> boy' >> > > Or, arguably better: > > s = '''hello > boy''' That is a different string, it contains a newline, the original does not: In [20]: s = 'hello\ : boy' In [21]: s2

Re: [Tutor] Logging with proper format

2007-10-07 Thread Kent Johnson
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 o

Re: [Tutor] Logging with proper format

2007-10-07 Thread Eric Brunson
claxo wrote: > dont indent the line after '\', that means 0 indent > > s = 'hello\ > boy' > Or, arguably better: s = '''hello boy''' > > ___ > Tutor maillist - Tutor@python.org > http://mail.python.org/mailman/listinfo/tutor >

Re: [Tutor] Logging with proper format

2007-10-07 Thread claxo
dont indent the line after '\', that means 0 indent s = 'hello\ boy' ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor

[Tutor] Logging with proper format

2007-10-07 Thread wormwood_3
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

[Tutor] Logging with proper format

2007-10-07 Thread wormwood_3
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 c