On Sat, Jun 25, 2016 at 02:41:04PM +0300, Victor Porton wrote: > I have an interpreter name (say "Python") and an interval of versions (say > "2.5 - 2.6"). > > Based on this data I need to select the python executable among installed > files, if available.
That "problem" is solved by '#!/usr/bin/env python' > The rule of the "game" is that I write a data file (preferably in RDF/Turtle > format) which describes all available version of Python (and other > interpreters). That seems like the (wrong??) mindset "I have problem, so I add something". > My question is advice how to do it, in a practical way. > > For example, if I understand correctly /usr/bin/python on some systems may > mean Python 2.x and on some systems Python 3.x. > > Is there any "standard" to avoid such multiple meanings of an executable > located in the same path of the filesystem? In Debian, are there always more > specific paths like /usr/bin/python2.7 or /usr/bin/python3.1? > > Also, does it make sense to parse output of `dpkg -p`? or is it better to > write RDF config files manually? I think the original poster needs to elaborate the "problem" Regards Geert Stappers P.S. it is interpreter -- Leven en laten leven