<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DZone Snippets: traceback code</title>
    <link>http://snippets.dzone.com/posts</link>
    <pubDate>Fri, 08 Aug 2008 11:55:45 GMT</pubDate>
    <description>DZone Snippets: traceback code</description>
    <item>
      <title>Capture and email a traceback in Python</title>
      <link>http://snippets.dzone.com/posts/show/2041</link>
      <description>&lt;code&gt;&lt;br /&gt;import traceback, smtplib, StringIO&lt;br /&gt;fp = StringIO.StringIO()&lt;br /&gt;traceback.print_exc(file=fp)&lt;br /&gt;message = fp.getvalue()&lt;br /&gt;server = smtplib.SMTP(FAILURE_SERVER)&lt;br /&gt;server.sendmail(&lt;br /&gt;  FAILURE_FROM,&lt;br /&gt;  FAILURE_TO,&lt;br /&gt;  FAILURE_MESSAGE + '\n\n' + message,&lt;br /&gt;)&lt;br /&gt;server.quit()&lt;br /&gt;&lt;/code&gt;</description>
      <pubDate>Tue, 16 May 2006 04:57:06 GMT</pubDate>
      <guid>http://snippets.dzone.com/posts/show/2041</guid>
      <author>timmorgan (Tim Morgan)</author>
    </item>
  </channel>
</rss>
