By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
455,587 Members | 1,711 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 455,587 IT Pros & Developers. It's quick & easy.

list versions of all installed modules

P: n/a

Is there a quick way to list the version of each installed module?
--
View this message in context: http://www.nabble.com/list-versions-...p20204095.html
Sent from the Python - python-list mailing list archive at Nabble.com.

Oct 28 '08 #1
Share this Question
Share on Google+
1 Reply


P: n/a
John [H2O] wrote:
Is there a quick way to list the version of each installed module?
import sys
for name, module in sorted(sys.modules.items()):
if hasattr(module, '__version__'):
print name, module.__version__

Of course if you add __VERSION__, VERSION, and version, you
may get more.

--Scott David Daniels
Sc***********@Acm.Org

Oct 28 '08 #2

This discussion thread is closed

Replies have been disabled for this discussion.