win32, COM, and Solidworks (again) - Still Trying
John J. Lee
jjl at pobox.com
Sat Aug 9 16:21:44 CEST 2003
Markus Wankus <markus_wankus at hotmail.com> writes:
> On Thu, 7 Aug 2003 23:06:01 +1000 (EST), Andrew MacIntyre
> <andymac at bullseye.apana.org.au> wrote:
> > If you need to go beyond the IDispatch interface, Thomas Heller's ctypes
> > package looks to be your only option, short of creating a full-blown
> > Pythonwin wrapper (ala Pythonwin's MAPI support) for the SolidWorks COM
> > API.
> Yes, I was looking into this but was a little mystified at first. I
> generated the python wrapper and had a look inside, but was unsure of
> the extent of the Python code I was going to be required to write, as
> well as type conversions.
He wasn't talking about the automatically-generated makepy Python
code, but rather hand-crafted C code wrapper around a particular
vtable COM interface (though Mark may have some tools to help with the
process of writing such wrappers, I don't think it's automated).
ctypes is an easy way of doing it than writing a C wrapper.
More information about the Python-list