Decoupling the version of the file from the name of the module.
Kirk McDonald
mooquack at suad.org
Sat Jan 28 17:35:36 EST 2006
bobueland at yahoo.com wrote:
> Now suppose I have make a new version with __version__ = 1.1. What
> shall I call this file and (I don't want to overwrite the old file if I
> need to go back to it) how do I import it from the shell. Your advice
> sounds nice, but I would appreciate if you could give me (or point me
> to) a simple example.
>
> Thanks
>
Before you make a new version, rename circle.py to, e.g., circle-1.0.py,
and then create the new version as circle.py. Then you can access the
new version just like you accessed the old. If you make yet another new
version, then rename the current circle.py as circle-1.1.py, and lather,
rinse, repeat.
However, I'd still look into a version control system like Subversion.
It can do all of this for you.
-Kirk McDonald
More information about the Python-list
mailing list