title: How to reference an exception class in Python?
body: <p>I want to catch a <a href="https://github.com/tkrajina/gpxpy/blob/master/gpxpy/gpx.py#L64" rel="nofollow">GPSException</a> thrown by the <a href="https://github.com/tkrajina/gpxpy" rel="nofollow">gpxpy library</a>.</p>
  
  <pre><code>try:
      gpx = gpxpy.parse(open(filepath))
  except GPXException:
      print "GPXException for %s." % filepath
  </code></pre>
  
  <p>Since I am new to Python I do not understand how one would reference the exception via namespace such as <code>gpxpy.gpx.GPSException</code> or an import statement such as ..</p>
  
  <pre><code>import gpxpy
  import gpxpy.gpx
  import gpxpy.gpx.GPSException
  </code></pre>