Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Python 3.0 Windows/COM

How to access a COM object from a python file using python 3.0.

And, yes, I know that not a lot of people are using Python 3.0. Switching back to 2.6 is a huge hassle for me, so I don't want to unless I absolutely have to.

I appreciate your time, and any assistance!

like image 619
bitcycle Avatar asked Dec 29 '25 07:12

bitcycle


1 Answers

Install pywin32 and then create the object using it's progid:

import win32com.client
object = win32com.client.Dispatch("Outlook.Application")

See also the Python and COM tutorial.

EDIT: Hmm... looks like they may not have a python 3.0 version yet.

like image 132
i_am_jorf Avatar answered Dec 31 '25 22:12

i_am_jorf