[Python-Dev] Re: Inline code in other languages

Barry A. Warsaw barry@zope.com
Wed, 22 Aug 2001 21:20:51 -0400


>>>>> "KY" == Ka-Ping Yee <ping@lfw.org> writes:

    >> Slick indeed!  I don't see much that's beyond Python's grasp.
    >> The syntax of course would be more Pythonic,

    KY> Perhaps:

    |     import inline
    |     inline.C('''

    |     void greet(char* str)
    |         {
    |         printf("%s, %s, %s, lovely %s\n", str, str, str, str);
    |         }

    |     ''')

    |     from inline.C import greet
    |     greet('spam')

    KY> ...?

Works for me!
-Barry