How do i get the version of an installed module in python programatically
<p>for the modules:</p>

<pre>
required_modules = ['nose', 'coverage', 'webunit', 'MySQLdb', 'pgdb', 'memcache']
</pre>

<p>and programs:</p>

<pre>
required_programs = ['psql', 'mysql', 'gpsd', 'sox', 'memcached']
</pre>

<p>something like:</p>

<pre>
# Report on the versions of programs installed
    for module in required_modules:
        try:
            print module.__version__
        except:
            exit

</pre>
