[python-win32] How to get the pywin version number?

Marc-Andre Belzile Marc-Andre.Belzile at autodesk.com
Thu Apr 15 22:44:37 CEST 2010


Hi,

what is the recommended way of getting the pywin version number from python ?

I'm currently using this snipet:

import os
import distutils
import distutils.sysconfig
site_packages = distutils.sysconfig.get_python_lib(plat_specific=1)
build_no = open(os.path.join(site_packages, "pywin32.version.txt")).read().strip()
print  ("PyWin32 version:  %s") % ( build_no)

thanks
-mab
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-win32/attachments/20100415/2d03e31b/attachment.html>


More information about the python-win32 mailing list