I have a PyQt application that reads and writes data files. I am including a 'version number' in each file written.  This is a simple number similar to: 1.2  or something (major and minor versions).
I am doing this so that I can change the format of these data files in future versions and then still correctly parse them simply by checking to see what the version is inside the file.
My question is what is the best practice for keeping this number stored inside the app itself.  I.e. do I just hard-code the app version number into the class that is responsible for reading and writing files?  Or should I have some sort of object/variable stored at the top-level of the app and somehow access it from the class responsible for reading and writing these files.  If the latter, how do I store it and how do I access it?
Thanks.
Personally, I wouldn't do it manually this way.  I'd save my code in Subversion and let it maintain the revision numbers for me.
Python: Best practice for including a version number in an app?