win32, COM, and Solidworks (again) - Still Trying

John J. Lee jjl at pobox.com
Mon Aug 11 20:12:29 EDT 2003


Markus Wankus <markus_wankus at hotmail.com> writes:

> On 09 Aug 2003 15:21:44 +0100, John J. Lee <jjl at pobox.com> wrote:
> 
> > 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.
> >
> 
> Hmmm.. I guess I am not following.  I'll go back to the ctypes page
> again and give it another go.

Ah, maybe it was me who wasn't following.  I haven't looked at the
ctypes COM support.  I was thinking you were referring to the
win32all-generated Python code, but maybe ctypes does Python code
generation too, and you were referring to that?  Dunno.


John




More information about the Python-list mailing list