473,830 Members | 2,045 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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\win32c om\gen_py\{...} \I<interfaceNam e>.py

seem not work corectly.

From the traceback, when i do
myObj = win32com.client .Dispatch("<Pro gId>")
----------------------------------------------
[...]
__import__("win 32com.gen_py." + dir_name + "." + child)
File
"c:\Python24\li b\site-packages\win32c om\gen_py\D0BC1 B38-B4AC-480A-86B0-81
DA572765CDx0x1x 0\IDssInterface .py", line 125
IDssInterface_v tables_ = [dispatch_ = 1
^
SyntaxError: invalid syntax

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

IDssInterface_v tables_dispatch _ = 1
IDssInterface_v tables_ = [
[...]

Now I change the file IDssInterface.p y by hand to:
--------------------------------------------------
[...]
LCID = 0x0
IDssInterface_v tables_dispatch _ = 1
IDssInterface_v tables_ = [
[...]

and everything works fine !!!

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

Regards
Alexander
Aug 3 '05 #1
2 2077

"Alexander Eisenhuth" <ne******@staco m-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******@staco m-software.de> wrote in message
news:dc******** **@online.de...
ActivePytho n 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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
543
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 can run my py-file without any errors. but if i close the pythonwin and restart and then try to run my py-script i get the following error: File "C:\Program Files\Python22\contacts_ausgabe.py", line 45, in
1
2121
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 = Connection()
3
2698
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 win32. Portions Copyright 1994-2001 Mark Hammond (mhammond@skippinet.com.au) - see 'Help/About PythonWin' for further copyright information. >>> Failed to execute command: from win32com.client import makepy;makepy.main() Traceback (most recent call...
0
1343
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. Here's a simple example to illustrate the point. I created the C++-based server for this example by pilfering some code in Andrew Troelsen's book on COM and ATL. car = Dispatch("ScriptibleCoCar.DualCoCar") person =...
1
1425
by: markscottwright | last post by:
Has anyone sucessfully run makepy and Microsoft Word Object Library (9.0)? Mine crashes under XP Pro and Python 2.4. It only seems to be word that has the problem, though. I get a dialog that says that pythonwin.exe has crashed: AppName: pythonwin.exe AppVer: 0.0.0.0 ModName: ntdll.dll ModVer: 5.1.2600.1217 Offset: 000096f9
1
3254
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.) Running makepy, selecting "Microsoft ActiveX Data Object 2.8" 2.) Starting PythonWin IDE
1
2731
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, ActivePython 2.4 (build 247) and Microsoft Word 11.0 Object Library (8.3), then I get the following SyntaxError, and on two different computers I tested this. More on the error below, but has anyone else had this problem? Will there soon be a newer...
1
1338
by: bg_ie | last post by:
Hi, I have a problem where an earlier version of my Com object is being used by makepy for early binding. In makepy I see - MyCom (1.0) MyCom (1.0) MyCom (2.0) I created version 2 of my Com object hoping that this would solve the
4
3471
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 Object Library(1.5)" I am getting an Syntax Error and command:
0
1761
by: Alan Meyer | last post by:
I had an unusual problem tonight running makepy to install some Microsoft COM interfaces in a Python 2.5 Windows XP installation created using the ActiveState installer. In earlier versions of Python, the files were generated to: \PythonXX\Lib\site-packages\win32com\gen_py But in my 2.5 installation they were generated to my temp directory, in my case this was:
0
9793
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9642
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10491
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
9315
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
5617
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5780
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4411
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3959
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
3076
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.