winapi32.GetFileVersionInfo() - problem

Heiko Wundram modelnine at
Fri Mar 25 12:58:36 CET 2005

> <snip the fourth and hopefully last repost>

Do you actually think anybody will reply to your mail if you keep reposting at 
this frequency? It'll rather make most people here kill-file you.

One post is enough; we've seen your problem, and it seems as though nobody 
here has a better solution than what Dennis Lee Bieber has already offered.

Just to make sure you understand what he said, I'll repeat it here: Your DLL 
doesn't contain a resources section, which in turn contains the version 
information you're asking for. So, please start reading MSDN and the VC++ 
documentation on how to add this information to your DLL.

If you wish to catch the exception that's raised (because the resource block 
isn't present), use something like the following:

    d = win32api.GetFileVersionInfo(fname,r"\")
    d = None

if d is None:
    print "No version info in file!"
    <do something with the version info>

--- Heiko.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 196 bytes
Desc: not available
URL: <>

More information about the Python-list mailing list