I am trying to build an HTML body text for an email using a docstring with
variables inserted a certain points.  It all works just fine, except that
the first instance of the variable "pecn" in the HTML link does not get
inserted into the text.  The second instance of "pecn" gets inserted ok into
that HTML link.   What is the right way to do this or is there a better way
in general?

This my code:

pecn = "5022543"
pecn_project = "F876540"
pdesc = "some sort of ECN for who knows what reason!"

newMail.HTMLBody = """
<pre>
ECN number """+pecn+""" on Project """+pecn_project+""" has been closed.
Below is a link to the ECN on the intranet.
<a href="http://web_server_at_work.com/cgi-bin/part-url.cgi?ecn=";
"""+pecn+""" "">"""+pecn+"""</a>
ECN Description:
"""+pdesc+"""

ECN Effect of Change Comments:
    (still need to work on this part)

R&D Information:
    (still need to work on this part)
</pre>
"""
_______________________________________________
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor

Reply via email to