function to find the modification date of the project

James Mills prologic at
Mon Jan 19 23:39:51 CET 2009

On Tue, Jan 20, 2009 at 7:44 AM, Joe Strout <joe at> wrote:
> This isn't a question, but something I thought others may find useful (and
> if somebody can spot any errors with it, I'll be grateful).
> We had a case recently where the client was running an older version of our
> app, and didn't realize it.  In other languages I've avoided this by
> displaying the compile date in the About box, but of course Python doesn't
> really have a meaningful compile date.  So, instead we're now displaying the
> latest modification date of any .py file in the project.  Here's the
> function that finds that:

You know you could just store a __version__
attribute in your main library ( :)

Normally in my project, this version string
is stored in in my library and
fetched in by my library's and
for distribution. Works great :)


More information about the Python-list mailing list