Eileen Wei wrote: > > I wonder if ctype can be used on C++ code as well? By searching on > line the answer I found seems to be that it can’t, but I don’t know if > those are the “right” answers. If ctype can be used on C++ then it > seems like the most straightforward way to go, is that correct? >
ctypes can't be used to call C++ object methods. It calls DLL entry points. > The applications I would like to test by exposing their APIs are not > designed to be controlled programmatically, and even though some of > them have very limited COM interface, most don’t. And I think I > probably need to expose a function from here and a function from there > depending on what I need to drive my test. > If an application is not designed to be controlled programmatically, then you can't force it to be controlled. It would require modifications to the applications. As long as you are modifying the applications, you might as well expose a COM interface to do what you need. > So if ctype cannot be used on C++, then between COM, SWIG and PyCXX, > which would be a better choice? Also Tim you mentioned learning curve > of SWIG, I wonder how is that compared to COM? > So, what are we talking about here? Are you talking about adding something to an existing application that allows it to be controlled from the outside? In that case, I don't thing SWIG or PyCXX will help you. Those things let you call into DLLs, not into other applications. COM support is already built-in to Python. If you have the option to add a COM interface, that's probably the way to go. -- Tim Roberts, t...@probo.com Providenza & Boekelheide, Inc. _______________________________________________ python-win32 mailing list python-win32@python.org http://mail.python.org/mailman/listinfo/python-win32