Line Breaks

Gary Herron gherron at islandtraining.com
Tue Nov 24 00:23:41 EST 2009


Susan Day wrote:
> On Mon, Nov 23, 2009 at 2:26 PM, Gary Herron 
> <gherron at islandtraining.com <mailto:gherron at 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
>     is your evidence that line breaks are being ignored.  With that
>     information, perhaps we can identify and solve the real problem
>     you're having.
>
>
> 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.
> TIA,
> Suzie


You say "it does in fact ignore all line breaks", but which "IT" are you 
talking about.  The line of code you originally showed us
        msg = 'A Message From %s:\n\n %s' % (string.replace(customer, 
'_', ' '), msg)
in fact does NOT ignore line breaks, and I demonstrated that to you.    
Your problem is somewhere else. 

Now you've shown us one more line of code.  But why only one?   Why make 
it so hard for us to help you?   I for one will consider volunteering 
more time on this problem only if I get a small, complete program, which 
demonstrates the problem, and which I can cut and paste.

Gary Herron






More information about the Python-list mailing list