[Grok-dev] Re: Grok 0.13 released!
Philipp von Weitershausen
philipp at weitershausen.de
Tue Jun 24 06:33:23 EDT 2008
Uli Fouquet wrote:
> I think it would be useful to make the Grok version better visible. This
> could be done for instance in the admin-UI. The question then is, how
> the admin UI code should determine the version number. The easiest IMHO
> would be, if there would be something like a `__version__` attribute for
> the grok package. So you could do::
> >>> import grok
> >>> grok.__version__
> What do you think?
That's one way, but I think setuptools has some API to determine the
installed version of an egg. I think we should try to avoid maintaining
a version number in both setup.py and grok/__init__.py.
If you're just looking for a quick way to determine the installed
version yourself (e.g. for a tutorial), I suggest this:
>>> import grok
<module 'grok' from '.../grok-0.13-py2.4.egg/grok/__init__.pyc'>
More information about the Grok-dev