[python-win32] Getting pywin32 build number
Luc Saffre
luc.saffre at gmx.net
Thu May 25 11:02:37 CEST 2006
I support Justin's request: the pywin32.version.txt has been a big step
forward, but it is still not easy to get this information (in a reliable
way) from within user code. Python packages usually provide a
__version__ variable in their __init__.py.
http://www.python.org/~jeremy/weblog/030924.html
http://www.python.org/dev/peps/pep-0314/
It is true that pywin32 has a lot of modules, so you must use some trick
to avoid having to update each __init__.py manually before a release.
Luc
On 28.10.2005 18:29, Justin Johnson wrote:
> Would you be opposed to introducing a variable with the version number
> so it can be accessed more conveniently?
>
> On 10/27/05, *Mark Hammond* <mhammond at skippinet.com.au
> <mailto:mhammond at skippinet.com.au>> wrote:
>
> Nope, that's it - or you could use win32apiGetFileVersionInfo to
> check a specific DLL/.pyd.
>
> Mark.
>
> -----Original Message-----
> *From:* python-win32-bounces at python.org
> <mailto:python-win32-bounces at python.org>
> [mailto:python-win32-bounces at python.org
> <mailto:python-win32-bounces at python.org>]*On Behalf Of *Justin
> Johnson
> *Sent:* Friday, 28 October 2005 7:43 AM
> *To:* python-win32 at python.org <mailto:python-win32 at python.org>
> *Subject:* [python-win32] Getting pywin32 build number
>
> Is the build number for pywin32 (win32all) available anywhere
> other than pywin32.version.txt sitting in site-packages? I want
> to raise an exception if the wrong version is installed. I can
> read this file if needed, but it seems like there should already
> be a variable or function for getting this.
>
> Thanks,
> Justin
>
More information about the Python-win32
mailing list