title: Checking a Python module version at runtime
body: <p>Many third-party Python modules have an attribute which holds the version information for the module (usually something like <code>module.VERSION</code> or <code>module.__version__</code>), however some do not.</p>
  
  <p>Particular examples of such modules are libxslt and libxml2.</p>
  
  <p>I need to check that the correct version of these modules are being used at runtime. Is there a way to do this?</p>
  
  <p>A potential solution wold be to read in the source at runtime, hash it, and then compare it to the hash of the known version, but that's nasty. </p>
  
  <p>Is there a better solutions?</p>