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* <[EMAIL PROTECTED] > <mailto:[EMAIL PROTECTED]>> wrote: > > Nope, that's it - or you could use win32apiGetFileVersionInfo to > check a specific DLL/.pyd. > > Mark. > > -----Original Message----- > *From:* [EMAIL PROTECTED] > <mailto:[EMAIL PROTECTED]> > [mailto:[EMAIL PROTECTED] > <mailto:[EMAIL PROTECTED]>]*On Behalf Of *Justin > Johnson > *Sent:* Friday, 28 October 2005 7:43 AM > *To:* python-win32@python.org <mailto:python-win32@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 > _______________________________________________ Python-win32 mailing list Python-win32@python.org http://mail.python.org/mailman/listinfo/python-win32