On Thu, Jul 12, 2001 at 09:03:07AM +0200, Jérôme Marant wrote: > Bruce Sass <[EMAIL PROTECTED]> writes: > > > > Surely adopting a convention of... > > > > #!/usr/bin/env python[major.minor] > > ... > I object to this. It make scripts not portable to other systems as > it currently does with current python 2.0 scripts in Debian.
True as this might be, the above scema still doesn't address all needs. The simple case were your script only runs with e.g. 2.1, is covered, but what happens when a newer Python is released? Is your script then still running with 2.1? Or do we need to update all scripts in order for them to use newer Pyton releases? The following scema will address such matters: #!/usr/bin/env python[[major[.minor][-][major[.minor]]] The interpretation is like, the major.minor before the - gives the lowest Python release for which the script works. If no lower bound is specified, any release will do. Similar for the major.minor with respect to the upper bound. It is an error to specify a lower and a upper bound without the -, and if there's no - it's ment to only run with this specific version. For this to work one has to make a series of symlinks for all of the above specified python<lower-upper> actually in use at a specific site, either in /usr/bin or in ~/bin, such that python<lower-upper> links to the highest available python release allowed by the upper limmit. Further more we need symlinks linking python<major> to the highest available minor release for that major release. The above seems complicated, but versioning a language is complicated. But take heart, Python manages to be fairly downwards compatible, so the upper bound might not be needed that often, though it is there for power users trying out stuff tied into specific releases. -- groetjes, carel