<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: Python &#8211; How to Catch sys.exit()</title>
	<atom:link href="http://www.answermysearches.com/python-how-to-catch-sysexit/316/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.answermysearches.com/python-how-to-catch-sysexit/316/</link>
	<description>Answers to everything I search for, every day</description>
	<lastBuildDate>Tue, 22 Nov 2011 08:57:22 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.1</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Jim</title>
		<link>http://www.answermysearches.com/python-how-to-catch-sysexit/316/comment-page-1/#comment-36461</link>
		<dc:creator>Jim</dc:creator>
		<pubDate>Tue, 06 Nov 2007 00:23:24 +0000</pubDate>
		<guid isPermaLink="false">http://www.answermysearches.com/python-how-to-catch-sysexit/316/#comment-36461</guid>
		<description>Nope, if you really want to catch all exceptions, you also have to remember that you can raise *strings* as exceptions too.</description>
		<content:encoded><![CDATA[<p>Nope, if you really want to catch all exceptions, you also have to remember that you can raise *strings* as exceptions too.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Greg Pinero (Primary Searcher)</title>
		<link>http://www.answermysearches.com/python-how-to-catch-sysexit/316/comment-page-1/#comment-36228</link>
		<dc:creator>Greg Pinero (Primary Searcher)</dc:creator>
		<pubDate>Thu, 01 Nov 2007 16:46:05 +0000</pubDate>
		<guid isPermaLink="false">http://www.answermysearches.com/python-how-to-catch-sysexit/316/#comment-36228</guid>
		<description>Thanks, so I guess I want BaseException.  Good to know.</description>
		<content:encoded><![CDATA[<p>Thanks, so I guess I want BaseException.  Good to know.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Chris</title>
		<link>http://www.answermysearches.com/python-how-to-catch-sysexit/316/comment-page-1/#comment-36166</link>
		<dc:creator>Chris</dc:creator>
		<pubDate>Thu, 01 Nov 2007 08:27:43 +0000</pubDate>
		<guid isPermaLink="false">http://www.answermysearches.com/python-how-to-catch-sysexit/316/#comment-36166</guid>
		<description>As sri said, if you really want to catch all exceptions in Python 2.5, use BaseException instead of Exception.</description>
		<content:encoded><![CDATA[<p>As sri said, if you really want to catch all exceptions in Python 2.5, use BaseException instead of Exception.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: sri</title>
		<link>http://www.answermysearches.com/python-how-to-catch-sysexit/316/comment-page-1/#comment-36159</link>
		<dc:creator>sri</dc:creator>
		<pubDate>Thu, 01 Nov 2007 04:19:14 +0000</pubDate>
		<guid isPermaLink="false">http://www.answermysearches.com/python-how-to-catch-sysexit/316/#comment-36159</guid>
		<description>I&#039;m assuming that you&#039;re using Python 2.5.
Check out this page:
http://docs.python.org/whatsnew/pep-352.html

KeyboardInterrupt is the other exception
that won&#039;t be caught by your 
&#039;except Exception:&#039; clause.</description>
		<content:encoded><![CDATA[<p>I&#8217;m assuming that you&#8217;re using Python 2.5.<br />
Check out this page:<br />
<a href="http://docs.python.org/whatsnew/pep-352.html" rel="nofollow">http://docs.python.org/whatsnew/pep-352.html</a></p>
<p>KeyboardInterrupt is the other exception<br />
that won&#8217;t be caught by your<br />
&#8216;except Exception:&#8217; clause.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Anonymous</title>
		<link>http://www.answermysearches.com/python-how-to-catch-sysexit/316/comment-page-1/#comment-36157</link>
		<dc:creator>Anonymous</dc:creator>
		<pubDate>Thu, 01 Nov 2007 03:49:23 +0000</pubDate>
		<guid isPermaLink="false">http://www.answermysearches.com/python-how-to-catch-sysexit/316/#comment-36157</guid>
		<description>Is there some reason you&#039;re not just doing:

&lt;code&gt;
try:
    sys.exit()
except:
    print &#039;hi&#039;
&lt;code&gt;?

This annoys pylint, but AFAIK it&#039;s the only guaranteed way to catch all exceptions.  (Runtime exceptions are supposed to extend the Exception base class, but not all code does it.  pyserial, I&#039;m looking at you.)</description>
		<content:encoded><![CDATA[<p>Is there some reason you&#8217;re not just doing:</p>
<p><code><br />
try:<br />
    sys.exit()<br />
except:<br />
    print 'hi'<br />
</code><code>?</p>
<p>This annoys pylint, but AFAIK it's the only guaranteed way to catch all exceptions.  (Runtime exceptions are supposed to extend the Exception base class, but not all code does it.  pyserial, I'm looking at you.)</code></p>
]]></content:encoded>
	</item>
</channel>
</rss>

