Call OCX from python?

Claudio Grondi claudio.grondi at freenet.de
Sat Nov 26 22:48:31 EST 2005


"JustSomeGuy" <nope at nottelling.com> schrieb im Newsbeitrag
news:5n4if.627200$1i.183531 at pd7tw2no...
> Hi I have a commercial OCX that I want to use in
> my python application.  How do I call OCXs from
> python?
> TIA

import win32com.client
axOCX =
win32com.client.Dispatch("RegistryEntryForThisOCXin[VersionIndependentProgID
]section")
retVal = axOCX.methodOfThisOCX(param1, param2)
value = axOCX.attributeOfThisOCX

Claudio





More information about the Python-list mailing list