It appears Selecttlb.py for pywin32 210 doesn't handle typelibs with
hexadecimal version numbers. After updating our app to version 10.0
(a.0), we cannot use makepy anymore
The attached patch fixed the problem.
Logged In: YES
I'd love to find some documentation that states the tlb version numbers are hex! Are you sure that you aren't simply creating an invalid typelib for yourself? Office 10, for example, doesn't use hex to the best of my knowledge.
Logged In: YES
Not sure if there is a standard, but a simple version statement like the following actually produces a a.0:
By googling around a bit there seems to be several apps using this scheme (Corel Wordperfect 12)
Why disallow it in the first place?
Check out the following link:
Thanks for that - at least this confirms that (a) they *should* be hex, and (b) that even MS manages to get this wrong. I'd prefer to simply remove the int() calls alltogether, and then fix any code which still assumes integers. I've made that change locally, but I'm travelling, so unable to fully test this until I get home. I'd appreciate it if you could make a similar change (ie, remove the int() calls, and the try/except block completely) and see if anything else breaks for you.
Yes, at least interactive makepy from pythonwin works without the int calls (I even removed minor and major completely from selecttlb.py).
The bug doesn't appear with most typelibs, since their version numbers aren't high enough. For me, this is the case with all the Microsoft Office typelibs.
Note that the Microsoft office Typelib browser doesn't show the version numbers at all. It only shows the typelib "helpstring". Maybe you should remove the version number too?
Checking in selecttlb.py;
new revision: 1.9; previous revision: 1.8