File version on Windows

Duncan Booth duncan at NOSPAMrcp.co.uk
Fri May 23 03:52:46 EDT 2003


"Eugene C." <hc_74 at yahoo.com> wrote in
news:qKaza.47148$h42.22203 at twister.nyc.rr.com: 

> Hey all. I've been browsing the Python documents and the Internet for
> information on retrieving the version of a file on Windows-based
> machines. It seems there is a Win32API method called
> GetFileVersionInfo() which retrieves the version information from a
> file. However, the win32api module (from win32all extensions) which
> comes with ActiveState Python does not include this method. Anyone
> have any ideas how I can get file version info? Thanks much!
> 
Go to http://dales.rmplc.co.uk/Duncan/accu and you'll find my talks from 
this year's ACCU conference. The Integrating Python talk used this api as 
an example so you'll find wrappers for it both using the raw C api and 
using Pyrex (the Pyrex one is slightly better).

If you have problems compiling the examples drop me an email and I'll send 
you a prebuilt dll.

-- 
Duncan Booth                                             duncan at rcp.co.uk
int month(char *p){return(124864/((p[0]+p[1]-p[2]&0x1f)+1)%12)["\5\x8\3"
"\6\7\xb\1\x9\xa\2\0\4"];} // Who said my code was obscure?




More information about the Python-list mailing list