jim-easterbrook / python-gphoto2

Python interface to libgphoto2
GNU Lesser General Public License v3.0
359 stars 59 forks source link

Getting detected versions of python-gphoto2 and libgphoto2? #111

Closed JoeWise closed 3 years ago

JoeWise commented 3 years ago

Hello,

As a sanity check, I'd like to confirm which version of python-gphoto2 is installed along with which version of libgphoto2 is being utilized by python-gphoto2. Is this possible currently?

For comparison, using gphoto2 I can call gphoto2 -v on the command line to get something to similar to

This version of gphoto2 is using the following software versions and options: gphoto2.......................2.5.23.1 libgphoto2..................2.5.26 libgphoto2_port........0.12.0

jim-easterbrook commented 3 years ago

The python-gphoto2 version is available as the constant gp.__version__. The libgphoto2 version is available with the function gp.gp_library_version(verbose). verbose should be 0 or 1. The libgphoto2_port version is available with the function gp.gp_port_library_version(verbose).

jim-easterbrook commented 3 years ago

See also the gphoto2_version.py example program.

JoeWise commented 3 years ago

Awesome, that is exactly what I was looking for. Thank you!