python deployment /usr/bin/env portability


at commencement executable python scripts i put line:



#!/usr/bin/env python


i'm controlling scripts component where env python yields python 2.2 environment. scripts fast destroy since i have authority check congruous python version:



if sys.version_info < (2, 4):
lift importerror("cannot run python chronicle < 2.4")


i don't wish have change shebang line each executable file, it's possible; however, i don't have executive opening accessory change outcome env python i don't wish force sole version, in:



#!/usr/bin/env python2.4


i'd prevaricate since component competence have newer chronicle python 2.4, competence have python 2.5 nonetheless python 2.4.



what's glorious solution?



[edit:] i wasn't specific adequate posing doubt -- i'd let users govern scripts but authority settlement (e.g. route alteration symlinking ~/bin ensuring your route ~/bin before python 2.2 path). maybe chain concentration mandatory hinder authority tweaks?



Comments

Popular posts from this blog

list macos calm editors formula editors

how i practical urls indicate .aspx pages asp.net deployed an iis? (preferably but iis)

jaxb - xjc - reworking generated typesafe enum category members