Python – Get Python and pywin32 version 1


This code gets the working Python and pywin32 version numbers.

 
import sys
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 "Python version:   " + sys.version
print "PyWin32 version:  " + build_no

One thought on “Python – Get Python and pywin32 version

Comments are closed.