[Python-Dev] PyInline

Paul Prescod paulp@ActiveState.com
Wed, 22 Aug 2001 18:43:21 -0700


Skip Montanaro wrote:
> 
>     BAW> From what you and Ping described, I doubt it needs to be PEP'd.  It
>     BAW> could all be done in a module, without any impact on the language
>     BAW> I'd imagine.
> 
> Agreed.  I believe it's the same with Perl's Inline module.  In fact, I
> first encountered it about a year ago when trying to figure out how to write
> Mason components in Python.  I seem to recall that the author(s) wrote
> Inline as a lark.

Yes but Inline has grown into an all-consuming obsession. He left his
job at ActiveState to pursue it "full time". There is even an Inline
t-shirt. Inline won an award for best new module at the Perl conference.
Outside of Perl 6, it is probably the biggest new thing in the Perl
world.

It isn't as trivial as you think. It is essentially a superset of SWIG's
Python-related functionality. Don't forget that an important part of it
is trying to autodetect types. It quickly gets into figuring out structs
and then classes and then templates and then madness ensues. Obviously
you have to decide how much you are going to support and just require
"compliant" wrappers for the rest. Using SWIG might allow you to offload
a bunch of that effort for PyInline::C.

Plus, there is Inline::C, Inline::Python, Inline::Fortran, Inline::ASM,
Inline::Java, etc. 

http://search.cpan.org/search?mode=module&query=Inline%3a%3a

Finally, you have to think hard about how the thing interacts with
binary distributions for people without compilers. That includes a hefty
chunk of Python's user base. This is much more important than the other
two points.

I don't want to discourage anyone thinking about tackling it but I also
want to give you a reasonable sense of what needs to be implemented.
-- 
Take a recipe. Leave a recipe.  
Python Cookbook!  http://www.ActiveState.com/pythoncookbook