And normally in python to get the version of the package, I just do
import package_name
print(package_name.version)
However it doesn’t work with the digi-xbee one. I have check and at least in the old release I a unable to find the version file.
So how can I check the version of the digi xbee library that I am currently using from python.
The version attribute is a de-facto standard that modules and packages SHOULD provide, but it is not mandatory (see https://www.python.org/dev/peps/pep-0396/). It seems the digi-xbee library does not provide this attribute.
I did some experimentation and found that you can retrieve the version of the library using pkg_resources as follows: