By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
464,799 Members | 1,343 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 464,799 IT Pros & Developers. It's quick & easy.

Python COM

P: n/a
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
Share this Question
Share on Google+
5 Replies

P: n/a
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

P: n/a
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

P: n/a
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

P: n/a
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

P: n/a
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 discussion thread is closed

Replies have been disabled for this discussion.