title: Get the error code from tweepy exception instance
body: <p>I'm new to python and I'm trying to use a library. It raises an exception, and I am trying to identify which one. This is what I am trying:</p>
  
  <pre><code>except tweepy.TweepError as e:
      print e
      print type(e)
      print e.__dict__
      print e.reason
      print type(e.reason)
  </code></pre>
  
  <p>This is what I am getting:</p>
  
  <pre><code>[{u'message': u'Sorry, that page does not exist', u'code': 34}]
  &lt;class 'tweepy.error.TweepError'&gt;
  {'reason': u"[{u'message': u'Sorry, that page does not exist', u'code': 34}]", 'response': &lt;httplib.HTTPResponse instance at 0x00000000029CEAC8&gt;}
  [{u'message': u'Sorry, that page does not exist', u'code': 34}]
  &lt;type 'unicode'&gt;
  </code></pre>
  
  <p>Im trying to get to that code. I have tried e.reason.code with no success and I have no idea what to try.</p>