[python-win32] python win32com design question

Johannes Frank jmfrank63 at gmail.com
Tue Jan 29 15:48:09 CET 2013


Hello,

I am currently working with win32com to access ProgeCAD (an AutoCAD Clone)
Excel and PDFCreator.
Using

comobj = win32com.client.Dispatch('xxx')

 gives me an object through which I can access the COM interface and thus
the underlying program.
Within my program I have to pass this object around to make the interface
accessible whereever it is needed. Closing the program creates huge
problems, as now the object is void.

Instead of getting an object I would prefer to have:

class MyCom(win32com.some_inheritance):
     some code


mycom = MyCom('xxx')

Is something like this possible? If not, is there a reason it was designed
the way it is?

Thank you for your audience.

Kind regards

Johannes

-- 
Dipl.-Ing. (FH) Johannes-Maria Frank
Bildungsberater
Königsberger-Str. 19b
76139 Karlsruhe
Tel. +49(170) 3833849
e-mail: jmfrank63 at gmail.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-win32/attachments/20130129/8d2b39b6/attachment.html>


More information about the python-win32 mailing list