embedding C and Python in Perl

Steve Holden sholden at holdenweb.com
Fri Feb 9 11:33:19 EST 2001


"Eric Hagemann" <ehagemann at home.com> wrote in message
news:xbFg6.80652$B6.19092233 at news1.rdc1.md.home.com...
> Hey all   --- maybe Python needs the same ?  Anybody seen this ?
>
> http://www.perl.com/pub/2001/02/inline.html?wwwrrr_20010206.txt
>
>
Hmmmm ... a quote from the paper (and not

    use Inline C;
    print JAxH('Perl');


    __END__
    __C__
    SV* JAxH(char* x) {
        return newSVpvf("Just Another %s Hacker\n", x);
    }

When you run this program, it prints:

    Just Another Perl Hacker

Wow, this aids clarity SO much I think I'll retain my sanity by staying
miles away from it, thank you very much. Yet another example of "because we
can" design. I though Perl was supposed to be "so cool" that other languages
were unnecessary: at least the light has begun to dawn...

regards
 Steve





More information about the Python-list mailing list