Re: Line breaks in list causing a small formatting problem while joining the list

2011-01-21 Thread GrayShark
On Fri, 21 Jan 2011 07:39:26 -0800, Oltmans wrote: > Hi Python gurus, hope you're doing well. I've a small problem. > > When I run the following code > ___ names = ['oltmans','abramhovic','\n','sal','lee'] print '| ' + ' | '.join(names) >

Re: Line breaks in list causing a small formatting problem while joining the list

2011-01-21 Thread MRAB
On 21/01/2011 16:25, Peter Otten wrote: Oltmans wrote: Hi Python gurus, hope you're doing well. I've a small problem. When I run the following code ___ names = ['oltmans','abramhovic','\n','sal','lee'] print '| ' + ' | '.join(names) | oltmans |

Re: Line breaks in list causing a small formatting problem while joining the list

2011-01-21 Thread Peter Otten
Oltmans wrote: > Hi Python gurus, hope you're doing well. I've a small problem. > > When I run the following code > ___ names = ['oltmans','abramhovic','\n','sal','lee'] print '| ' + ' | '.join(names) > | oltmans | abramhovic | > | sal |

Re: Line Breaks

2009-11-23 Thread Gary Herron
Susan Day wrote: On Mon, Nov 23, 2009 at 2:26 PM, Gary Herron mailto:gher...@islandtraining.com>> wrote: >>> print 'A Message From %s:\n\n %s' % ('someone','some message') A Message From someone: some message So... *Exactly* what are you doing with msg, and *exactly* what

Re: Line Breaks

2009-11-23 Thread Lie Ryan
D'Arcy J.M. Cain wrote: On Mon, 23 Nov 2009 14:46:23 -0500 Susan Day wrote: First, it does in fact ignore all line breaks, not just double line breaks. Here's what I'm doing: session.sendmail(clientEmail, ourEmail2, header+msg) The email sent out has the message sans breaks. You should really

Re: Line Breaks

2009-11-23 Thread D'Arcy J.M. Cain
On Mon, 23 Nov 2009 14:46:23 -0500 Susan Day wrote: > First, it does in fact ignore all line breaks, not just double line breaks. > Here's what I'm doing: > session.sendmail(clientEmail, ourEmail2, header+msg) > The email sent out has the message sans breaks. You should really post an entire scri

Re: Line Breaks

2009-11-23 Thread Susan Day
On Mon, Nov 23, 2009 at 2:26 PM, Gary Herron wrote: > >>> print 'A Message From %s:\n\n %s' % ('someone','some message') > A Message From someone: > > some message > > > So... *Exactly* what are you doing with msg, and *exactly* what is your > evidence that line breaks are being ignored. With th

Re: Line Breaks

2009-11-23 Thread Gary Herron
Susan Day wrote: Hi; I have the following line of code I'm sending to postfix: msg = 'A Message From %s:\n\n %s' % (string.replace(customer, '_', ' '), msg) Unfortunately, it ignores the line breaks. I also tried %0A but that was ignored also. Please advise. TIA, Suzie That line does no

Re: Line Breaks

2009-11-23 Thread Stephen Hansen
On Mon, Nov 23, 2009 at 10:45 AM, Susan Day wrote: > Hi; > I have the following line of code I'm sending to postfix: > > msg = 'A Message From %s:\n\n %s' % (string.replace(customer, '_', ' '), > msg) > > Unfortunately, it ignores the line breaks. I also tried %0A but that was > ignored also. Pl