Embedded Perl or Python (XPost)

Tassilo v. Parseval tassilo.parseval at rwth-aachen.de
Sat Sep 6 11:27:32 CEST 2003


Also sprach Alex Martelli:

[ embedding an interpreter ]

> Another option you may want to consider is Ruby.  I don't know
> how easy it is to interface it specifically to C++, and in
> particular to get the cross-language subclassing and overriding
> effect you want (which Boost provides so smoothly) -- but it's
> basically the same power as Perl or Python, a distinctive style
> of its own that along some axes lies in-between the two P's,
> and a small but enthusiastic community.  Size-wise, though, I
> don't think it will significantly help you.

The C interface of Ruby is very simple and clear (likewise the C code in
which Ruby was written). It almost made me cry when I saw it and
compared it to that of Perl. :-) It's probably also smaller than both
Python and Perl. I don't know about Python, but Perl's unwrapped source
is currently well beyond 50meg. In compiled form it's still pretty large
due to all the modules that come with Perl. Not sure whether the OP
needs all of them though.

The bridge to C++ should not be so hard considering that a C++ compilers
wont mind to include C code as well (or can at the very least easily be
convinced to do so).

But anyway, embedding Perl is known to be hard.

Tassilo
-- 
$_=q#",}])!JAPH!qq(tsuJ[{@"tnirp}3..0}_$;//::niam/s~=)]3[))_$-3(rellac(=_$({
pam{rekcahbus})(rekcah{lrePbus})(lreP{rehtonabus})!JAPH!qq(rehtona{tsuJbus#;
$_=reverse,s+(?<=sub).+q#q!'"qq.\t$&."'!#+sexisexiixesixeseg;y~\n~~dddd;eval




More information about the Python-list mailing list