From: Bernie R. <br...@ec...> - 2004-06-22 11:25:27
|
At 11:05 AM 6/21/2004 -0700, brett hartshorn wrote: >Wrapping a >wrapper is not ideal, but from the perspective where several python >wrappers must be created and >maintained, it makes sense that they all use the same wrapping language. Perhaps, though I think it depends on the circumstances. For example, in the project I'm working on, I'm wrapping a C++ graphics library using SWIG and wrapping ODE using Pyrex. My reasoning is that the C++ graphics API is one project, the ODE wrapper is another, and my main project simply imports modules from the other two. In fact, I initially just used Mattias' PyODE without even knowing that it was written using Pyrex -- it was just a .pyd that I imported. The fact that I am now modifying some of the code in that wrapper doesn't really change anything -- the main project doesn't care where the .pyd files came from or what tools were used to create them. That means we can use the right tool for the job in each case. Since ODE is written in C, it makes sense to use Pyrex. Since the graphics library is written in C++, it makes sense to use SWIG. For other things, it makes sense to use Boost. I could easily see a Python application that imports modules that were created using all three tools, and the application developer doesn't need to know. >So it is a blancing act, do we >shoehorn ODE to fit into the Boost model, or do it the clean and quick way >with Pyrex? I vote for clean and quick. :-) >Btw, is anybody in the San Francisco area? I'm in Waterloo, Ontario Canada (about an hour west of Toronto). -- Bernie Roehl University of Waterloo Dept of Electrical and Computer Engineering Mail: br...@ec... Voice: (519) 888-4567 x 2607 [work] URL: http://ece.uwaterloo.ca/~broehl |