[Tutor] Finding the version # of a module, and py module problem
philip at semanchuk.com
Fri Aug 6 17:09:17 CEST 2010
On Aug 6, 2010, at 10:20 AM, Richard D. Moores wrote:
> On Thu, Aug 5, 2010 at 18:47, Philip Semanchuk
> <philip at semanchuk.com> wrote:
>> it's just a question of whether or not
>> the module in question exposes any kind of a version attribute.
>> There's no
>> standard, unfortunately. The most popular convention seems to be
>> via an
>> attribute called __version__, but I've also seen __VERSION__,
>> VERSION, and
> Here's one more way:
>>>> import gmpy
> Traceback (most recent call last):
> File "<stdin>", line 1, in <module>
> AttributeError: 'module' object has no attribute '__version__'
That's the nice thing about standards -- there are so many to choose
Thanks for pointing that out; I'll update my code.
More information about the Python-list