[python-win32] how to determine the version of pywin programmatically ?

Mark Hammond skippy.hammond at gmail.com
Tue Dec 9 23:55:26 CET 2008


Jim Vickroy wrote:

> I notice that the build number appears in:
> 
>     * pywin32.version.txt
> 
> but I was hoping for something similar to numpy or PIL.

I can't see a huge gain in pywin32 opening that file just to make it 
available in __version__, and having it manually maintained in a .py
file other than 'setup.py' doesn't appeal either - so I'm afraid you 
need to open that file yourself.  This is what pythonwin does for its 
about box.

A longer winded alternative is to read the version resources from any of 
the .dll files - the version number is embedded there - but getting the 
version string out without win32api is painful.

Mark



More information about the python-win32 mailing list