Hi,

to write a wrapper script I wonder what might be the best possibility
to find out the version numer of the running python interpreter. The
wrapper script is of the type

  /var/lib/python-support/python${PYVER}/${package}/${realscript}

and I wonder, how I can obtain ${PYVER} according to the version
of the python binary that is installed as /usr/bin/python.

I tried

  PYVER=`python -V 2>&1 | sed 's/Python[[:space:]]\+\([0-9]\+\.[0-9]\+\).*/\1/'`

which works in principle but I wonder if there is some other reasonable
way.

Kind regards

        Andreas.

--
http://fam-tille.de


--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to