COM interfacing / "Python Programming on Win32" question 
Author Message
 COM interfacing / "Python Programming on Win32" question

Finally, I just got my copy of the book (there were obviously some
distribution problems in Germany). Great work, Mark and Andy!

Now for my first question: The middle of p. 211 of the book says
"Python can't support arbitrary COM interfaces; the pythoncom module
(or a pythoncom extension) must have built-in support for the
interface.
Fortunately, there are tools pythoncom developers use that largely
automate the process of supporting new interfaces"

Do you have any links for those? Or am I missing something in the
book?
Right now I'm considering the feasibility of wrapping some selected
DirectX interfaces for Python. Any help would be appreciated.

Stefan



Wed, 04 Sep 2002 03:00:00 GMT  
 COM interfacing / "Python Programming on Win32" question

Quote:

> Finally, I just got my copy of the book (there were obviously some
> distribution problems in Germany). Great work, Mark and Andy!

Thanks!

Quote:
> Now for my first question: The middle of p. 211 of the book says
> "Python can't support arbitrary COM interfaces; the pythoncom module
> (or a pythoncom extension) must have built-in support for the
> interface.
> Fortunately, there are tools pythoncom developers use that largely
> automate the process of supporting new interfaces"

> Do you have any links for those? Or am I missing something in the
> book?
> Right now I'm considering the feasibility of wrapping some selected
> DirectX interfaces for Python. Any help would be appreciated.

We use 2 tools - SWIG and "makegw".  makegw is in the win32com package
(win32com.makegw.makegw).  makegw is a "generate once" tool - it takes
a .h file (as created from an IDL) and outputs .cpp code.  Once
generated, you edit by hand, and can not regenerate without losing the
old version.  makegw can create interfaces and gateways (ie, implement
interfaces and use interfaces).  Stuff like Active Scripting, Active
Debugging etc were done with this tool.

SWIG uses a .i file, and can be continuously tweaked.  However, it can
only generate interfaces - ie, it can use interfaces, but can not
generate code to implement interfaces.  The win32com.mapi support (and
a few others) were done in this way.

You should already have everything you need for makegw.  For swig, you
probably need to go to my starship page and download my customized SWIG
(and also get the latest .i files from cvs)

Mark.

Sent via Deja.com http://www.deja.com/
Before you buy.



Sat, 07 Sep 2002 03:00:00 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. string.join(["Tk 4.2p2", "Python 1.4", "Win32", "free"], "for")

2. "animator"-like debugger for *.com programs

3. Python "Interfaces"

4. Question: What Is "Ruby": Core and Interface

5. beginners "let"/"random" question

6. "Python Programming on Win 32" available

7. "Programming python" 834 page

8. "Programming Python", debugging embed example?

9. Tutorial for Python "way of programming"?

10. "Philosophical" python question

11. about utility program named "Winteracter "...i need any information about the program..^^

 

 
Powered by phpBB® Forum Software