Alan G Isaac wrote: > I assume there must be a reason for this:: > > >>> import pylab > >>> pylab.__version__ > Traceback (most recent call last): > File "<stdin>", line 1, in <module> > AttributeError: 'module' object has no attribute '__version__' > > That has always bothered me. > But of course you can:: > > >>> import matplotlib > >>> matplotlib.__version__ > '0.87.7'
After a little experimentation I have tentatively concluded that __version__ only gets imported if it is a package attribute--that is, if it is defined in __init__.py. Matplotlib is a package but pylab is just a module, so it does not seem to be possible to give it matplotlib's __version__. I could not find anything in the python documentation about this, though. Eric ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys - and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV _______________________________________________ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users