469,356 Members | 2,055 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,356 developers. It's quick & easy.

COM makepy problem

Hello together,

My system:
ActivePython 2.4.1
Windows XP

I write a COM Server in VC++ 6.0 using ATL. So far so good. While I
develop I got sometimes strange behaviour with makepy utility. Today
again. :-(

What I do on the python (COM client) side.
1) Register COM server
2) Use COM makepy utility
3) Create com client object using win32com.client.Dispatch(...)

The generated file in

c:\python24\lib\site-packages\win32com\gen_py\{...}\I<interfaceName>.py

seem not work corectly.

From the traceback, when i do
myObj = win32com.client.Dispatch("<ProgId>")
----------------------------------------------
[...]
__import__("win32com.gen_py." + dir_name + "." + child)
File
"c:\Python24\lib\site-packages\win32com\gen_py\D0BC1B38-B4AC-480A-86B0-81
DA572765CDx0x1x0\IDssInterface.py", line 125
IDssInterface_vtables_ = [dispatch_ = 1
^
SyntaxError: invalid syntax

file IDssInterface.py (starting at line 123)
--------------------------------------------
[...]
LCID = 0x0

IDssInterface_vtables_dispatch_ = 1
IDssInterface_vtables_ = [
[...]

Now I change the file IDssInterface.py by hand to:
--------------------------------------------------
[...]
LCID = 0x0
IDssInterface_vtables_dispatch_ = 1
IDssInterface_vtables_ = [
[...]

and everything works fine !!!

Does anybody have a suggestion/idea/hint on that ???

Regards
Alexander
Aug 3 '05 #1
2 1834

"Alexander Eisenhuth" <ne******@stacom-software.de> wrote in message
news:dc**********@online.de...
ActivePython 2.4.1
Windows XP

I write a COM Server in VC++ 6.0 using ATL. So far so good. While I
develop I got sometimes strange behaviour with makepy utility. Today
again. :-(

SyntaxError: invalid syntax


I've had the same problems; this pywin32 bug describes it:
http://sourceforge.net/tracker/index...18&atid=551954

I've found no way to avoid it except by downgrading to Python 2.4.

James
Aug 4 '05 #2
James Kew schrieb:
"Alexander Eisenhuth" <ne******@stacom-software.de> wrote in message
news:dc**********@online.de...
ActivePython 2.4.1
Windows XP

I write a COM Server in VC++ 6.0 using ATL. So far so good. While I
develop I got sometimes strange behaviour with makepy utility. Today
again. :-(

SyntaxError: invalid syntax


I've had the same problems; this pywin32 bug describes it:
http://sourceforge.net/tracker/index...18&atid=551954

I've found no way to avoid it except by downgrading to Python 2.4.

James

Do you know, where win32com looks for the COM-server class description
(that is generated wrong?)

Regards Alexander
Aug 4 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

1 post views Thread by Alv Mart | last post: by
3 posts views Thread by Gerson Kurz | last post: by
reply views Thread by Jim Kerr | last post: by
1 post views Thread by markscottwright | last post: by
1 post views Thread by Martin Stettner | last post: by
1 post views Thread by Steve M | last post: by
4 posts views Thread by suzhi18 | last post: by
reply views Thread by Alan Meyer | last post: by
1 post views Thread by CARIGAR | last post: by
reply views Thread by zhoujie | last post: by
reply views Thread by suresh191 | last post: by
1 post views Thread by Marylou17 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.