Re: Decoupling the version of the file from the name of the module.

2006-01-29 Thread Robert Kern
Steven D'Aprano wrote: > I distribute two apps, Parrot and Shrubbery. Both rely on a common module, > Spam. Parrot uses version 1 of Spam and Shrubbery uses version 2. For the > sake of the argument, Spam is completely backwards compatible, so I > have no problems with somebody installing Parrot p

Re: Decoupling the version of the file from the name of the module.

2006-01-29 Thread Xavier Morel
[EMAIL PROTECTED] 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

Re: Decoupling the version of the file from the name of the module.

2006-01-29 Thread Steven D'Aprano
On Sun, 29 Jan 2006 00:07:29 -0800, Raymond Hettinger wrote: > [EMAIL PROTECTED] >> I'm a newbie experimenting with Python. I want to incrementally develop >> a module called 'circle'. > . . . >> Basically I want to decouple the version of my file from the name of >> the module. >> >> Is there a

Re: Decoupling the version of the file from the name of the module.

2006-01-29 Thread Raymond Hettinger
[EMAIL PROTECTED] > I'm a newbie experimenting with Python. I want to incrementally develop > a module called 'circle'. . . . > Basically I want to decouple the version of my file from the name of > the module. > > Is there a *simple* way out of this dilemma. In the client code, use an import/as

Re: Decoupling the version of the file from the name of the module.

2006-01-28 Thread Peter Hansen
Roy Smith wrote: > [EMAIL PROTECTED] 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)? > > Stop everything right now and get yourself some kind of version control > sys

Re: Decoupling the version of the file from the name of the module.

2006-01-28 Thread Roy Smith
[EMAIL PROTECTED] 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)? Stop everything right now and get yourself some kind of version control system. CVS (http://ximbiot.co

Re: Decoupling the version of the file from the name of the module.

2006-01-28 Thread Steven D'Aprano
On Sat, 28 Jan 2006 23:13:12 +0100, Xavier Morel wrote: > [EMAIL PROTECTED] wrote: >> I'm a newbie experimenting with Python. I want to incrementally develop >> a module called 'circle'. The problem is now that the file name is used >> for two purposes. To keep track of the version number and as t

Re: Decoupling the version of the file from the name of the module.

2006-01-28 Thread Roy Smith
In article <[EMAIL PROTECTED]>, [EMAIL PROTECTED] wrote: > I'm a newbie experimenting with Python. I want to incrementally develop > a module called 'circle'. The problem is now that the file name is used > for two purposes. To keep track of the version number and as the name > for the module. So

Re: Decoupling the version of the file from the name of the module.

2006-01-28 Thread Kirk McDonald
[EMAIL PROTECTED] 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

Re: Decoupling the version of the file from the name of the module.

2006-01-28 Thread bobueland
Xavier Morel wrote: > Just get rid of the version number in the name (what's the point) and >define a __version__ attribute in the module, that's what is usually done. Thanks Xavier, but as I said I'm newbie and I'm not sure how to do that. Here's my module # circle.py from math import pi __ver

Re: Decoupling the version of the file from the name of the module.

2006-01-28 Thread Paul Rubin
[EMAIL PROTECTED] writes: > Basically I want to decouple the version of my file from the name of > the module. > > Is there a *simple* way out of this dilemma. Really, you should use a source control system. That's a program that tracks the different versions of the files in your program. When

Re: Decoupling the version of the file from the name of the module.

2006-01-28 Thread Kirk McDonald
[EMAIL PROTECTED] wrote: > I'm a newbie experimenting with Python. I want to incrementally develop > a module called 'circle'. The problem is now that the file name is used > for two purposes. To keep track of the version number and as the name > for the module. So when I develop the first version

Re: Decoupling the version of the file from the name of the module.

2006-01-28 Thread Xavier Morel
[EMAIL PROTECTED] wrote: > I'm a newbie experimenting with Python. I want to incrementally develop > a module called 'circle'. The problem is now that the file name is used > for two purposes. To keep track of the version number and as the name > for the module. So when I develop the first version