473,397 Members | 2,033 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,397 software developers and data experts.

bug in Makepy

Jim
I was trying to use Makepy to wrap a typelib, but couldn't find the one
I wanted in the list of libs offered, and couldn't find a way to browse
to a specific one.

Turns out the reason was that the lib was version 10, which was listed
in the registry in hex as version a.0. The tlb chooser in Makepy
rejects hex values. The author was evidently aware of this, since there
is a comment in the code about it.

Here is a fix -- add 4 lines in
site-packages\win32com\client\selecttlb.py:

try:
# For some reason, this code used to assume the values were hex.
# This seems to not be true - particularly for CDO 1.21
# *sigh* - it appears there are no rules here at all, so when we need
# to know the info, we must load the tlb by filename and request it.
# The Resolve() method on the TypelibSpec does this.
major = int(major_minor[0])
minor = int(major_minor[1])
except ValueError: # try again in case values are in hex
=> try:
=> major = int(major_minor[0], 16)
=> minor = int(major_minor[1], 16)
=> except ValueError: # crap in the registry!
continue

Hope this helps someone.

-- Jim

Jun 22 '06 #1
2 1095
Jim
> This only works if the hexadecimal representation has digits in [A-F].
What if the stored value is 10, but in hexadecimal?


I don't get what you mean. If the value is "10, but in hexadecimal",
isn't that A?

The problem my fix solves is where the folder under the typelib guid is
named something like "a.0." It does what I need. If you see a case it
doesn't handle, maybe you could propose a better fix?

-- Jim

Jun 22 '06 #2
Jim
> Always interpret it as hex, or always interpret it as decimal.

I see what you mean. But I don't think I'll worry about it.

-- Jim

Jun 23 '06 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: bk | last post by:
hi, i'm using pythonwin 2.2.3 my programm reads and write the outlook-adress book using COM. for this i have to use the makepy utility. after i have run the utiltity everything is fine and i...
1
by: Alv Mart | last post by:
Hi, I ran makepy for ADO. After I installed a new version of python I have this error: Do you know why could I have this error? >>> from ADODB import Connection,Recordset >>> conn =...
3
by: Gerson Kurz | last post by:
I have problems getting "COM makepy" working in ActivePython 2.3.2. This is what happens when I start "COM makepy" from the Pythonwin Menu: PythonWin 2.3.2 (#49, Nov 6 2003, 10:18:20) on...
0
by: Jim Kerr | last post by:
Does makepy always respect versioning of interfaces? It appears as though makepy correctly handles versioning of objects you obtain directly, but not for objects you get via a function call. ...
2
by: Svenn-Ivar Svendsen | last post by:
Hi, I use the makepy tool in pythonwin to generate wrappers for my connection point (event) interfaces in a project. It works fine. The question is; Is it possible, in a python script, to detect...
2
by: nvhengr | last post by:
Has anyone seen this? When I run the COM Makepy utility and choose Microsoft Excel 9.0 Object Library (1.3), I get an application error message: PythonWin: Pythonwin.exe - Application Error...
1
by: Martin Stettner | last post by:
Hi, when trying to generate the wrapper classes for Microsofts ADO Library (Version 2.8) with makepy, I run into the following problem. Here's what I do (I use ActiveState Python 2.4.1.245) ...
1
by: Steve M | last post by:
When I use the COM Makepy utility on one computer with WindowsXP, ActivePython 2.3 and I select the library Microsoft Word 10.0 Object Library (8.2), things work fine. When I have WindowsXP,...
1
by: Chris Curvey | last post by:
I'm trying to track down a performance issue in my Windows code, and hotshot is telling me that the most time and calls are spent in these methods ncalls tottime percall cumtime percall...
4
by: suzhi18 | last post by:
Hallo, I've a problem getting makepy running. When I start the tool on my machine with doubleclick everything is fine. But when I try this in my Code: makepy.py -i "Microsoft Excel 11.0...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.