473,322 Members | 1,781 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,322 software developers and data experts.

Python COM

I have implemented a COM in C++,buy i don't know how to use this COM
in python.
For example: the COM's ProgID is "MyCOM1.AdvMethod".this COM have two
interfaces,the default interface's name is IAdvMethod,the second
interface's name is IBasicMethod.
How do i use those interfaces in python.Thank you very much,please
answer my question in code.
Jul 29 '08 #1
5 1100
bi********@gmail.com schrieb:
I have implemented a COM in C++,buy i don't know how to use this COM
in python.
For example: the COM's ProgID is "MyCOM1.AdvMethod".this COM have two
interfaces,the default interface's name is IAdvMethod,the second
interface's name is IBasicMethod.
How do i use those interfaces in python.Thank you very much,please
answer my question in code.
http://starship.python.net/crew/theller/comtypes/
Diez
Jul 29 '08 #2
Hi!

Example, with Pywin32:

import win32com.client
moncom = win32com.client.Dispatch('MyCOM1.AdvMethod')
moncom.IAdvMethod(...

See Pywin32 here: http://sourceforge.net/projects/pywin32/

@-salutations

Michel Claveau

Jul 29 '08 #3
Méta-MCI (MVP) wrote:
Hi!

Example, with Pywin32:

import win32com.client
moncom = win32com.client.Dispatch('MyCOM1.AdvMethod')
moncom.IAdvMethod(...

See Pywin32 here: http://sourceforge.net/projects/pywin32/
That's not working, because the OP has a custom interface, not
IDispatch-based.

Diez
Jul 29 '08 #4
Re!

Pywin32 can use dynamic COM server (without tlb).
Therefore, I prefer to wait the return from birdprince...

@-salutations
--
Michel Claveau
Jul 29 '08 #5
bi********@gmail.com wrote:
I have implemented a COM in C++,buy i don't know how to use this COM
in python.
For example: the COM's ProgID is "MyCOM1.AdvMethod".this COM have two
interfaces,the default interface's name is IAdvMethod,the second
interface's name is IBasicMethod.
How do i use those interfaces in python.Thank you very much,please
answer my question in code.
Suggestion: Post this to comp.python.windows instead of here. I think you will
find that a better place for this question.

-Larry
Jul 29 '08 #6

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

Similar topics

0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

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.