---------- Forwarded message ----------
Date: Mon, 7 Aug 2006 00:33:08 -0700 (PDT)
From: anil maran <[EMAIL PROTECTED]>
To: Danny Yoo <[EMAIL PROTECTED]>
Subject: Re: [Tutor] can you explain string replacement syntax and comma
separated statements
Dear danny yoo
The help page doesnt take about multiline string replacement and this example
doesnt work for me - it gives an error on text+ line
Please help me out
thanks a lot
Anil
olderror = web.internalerror
def error():
olderror()
import sys, traceback
tb = sys.exc_info()
text = """From: the bugman <[EMAIL PROTECTED]>
To: the bugfixer <[EMAIL PROTECTED]>
Subject: bug: %s: %s (%s)
Content-Type: multipart/mixed; boundary="----here----"
------here----
Content-Type: text/plain
Content-Disposition: inline
%s
%s
------here----
Content-Type: text/html; name="bug.html"
Content-Disposition: attachment; filename="bug.html"
""" % (tb[0], tb[1], web.ctx.path, web.ctx.method+' '+web.ctx.home+web.ctx.f
ullpath,
''.join(traceback.format_exception(*tb)),
text += str(web.djangoerror())
utils.send('[EMAIL PROTECTED]', '[EMAIL PROTECTED]', text)
web.internalerror = error
Danny Yoo <[EMAIL PROTECTED]> wrote:
On Sun, 6 Aug 2006, anil maran wrote:
> text = """From: the bugman
> To: the bugfixer
> Subject: bug: %s: %s (%s)
> Content-Type: multipart/mixed; boundary="----here----"
[text example cut]
Hi Anil,
Anil, take a look at:
http://www.python.org/doc/lib/typesseq-strings.html
Does this address your question?
On a high-level view of your questions so far: Are you running into
problems because you can't find the documentation? Or is the issue that
the documentation is unclear?
---------------------------------
Do you Yahoo!?
Next-gen email? Have it all with the all-new Yahoo! Mail Beta.
_______________________________________________
Tutor maillist - [email protected]
http://mail.python.org/mailman/listinfo/tutor