Archived

This forum has been archived. Please start a new discussion on GitHub.

Python bindings version number

It would be nice if the Python bindings could report the version of the
bindings they are, somthing like

Ice.version

would give 3.2.1.

I don't see anything currently:
>>> [x for x in dir(Ice) if x.find('ersion') != -1]
['StringConversionException', 'VersionMismatchException', '_t_StringConversionException', '_t_VersionMismatchException']

The reason this would be nice because we're going to be supporting
multiple versions of Ice installed on the same box at the same
time and it would be nice if Python scripts could dynamically
determine which version they are using.

For example, we have Ice 3.1.1 installed into /usr and recently
built 3.2.1 into /usr/local/ice/3.2-gcc34, both using RPMs. The
Python tools that use them pick up 3.1.1 automatically because
it's first in the sys.path, but I want the script to only support
3.2.1, so I put the /usr/local/ice/3.2-gcc34/.... into sys.path.
But if the 3.2.1 RPMs are not installed, which is possible, we're
talking about hundreds of systems, it'll still fall back to 3.1.1.

So having the Ice version number available would allow the
script to check and bail out early, instead of us wondering
why something isn't working and using lsof to see which shared
libraries the process has picked up.

This would be useful for the PHP and Ruby bindings also.

Regards,
Blair

Comments

  • matthew
    matthew NL, Canada
    Thanks for the suggestion. We'll look into adding this for the next release of Ice.