Possible Duplicate:
How to display current working copy version of an hg repository on a PHP page
Similar to How can I rewrite python __version__ with git?, what it is the best method to store an automatically updated version number inside a python file?
How good is my method of embedding version numbers into my application using Mercurial hooks? and the Mercurial keyword plan make it clear the svn-style method of automatically updating $Revision$
or $Id$
is not desirable and that the build system should do that work instead. This is python though, there is no build system and this is for a small program wholly contained in one file, so there is no packaging.