Python: Convert a string to an integer
<p>Does anybody have a quickie for converting an unsafe string to an <code>int</code>?</p>

<p>The string typically comes back as: <code>'234\r\n'</code> or something like that.</p>

<p>In this case I want <code>234</code>. If <code>'-1\r\n'</code>, I want <code>-1</code>.  I never want the method to fail but I don't want to go so far as try, except, pass just to hide errors either (in case something extreme happens).</p>
