[Python-Dev] FW: PyInline Released: Put C source code directly "inline" with your Python!

Tim Peters tim.one@home.com
Tue, 28 Aug 2001 15:01:47 -0400


FYI.  I haven't checked it out.

-----Original Message-----
From: python-list-admin@python.org
[mailto:python-list-admin@python.org]On Behalf Of Ken Simpson
Sent: Tuesday, August 28, 2001 2:06 PM
To: python-list@python.org
Subject: PyInline Released: Put C source code directly "inline" with
your Python!


The PyInline module allows you to put source code from other
programming languages directly "inline" in a Python script or
module. The code is automatically compiled as needed and then loaded
for immediate access from Python.

In short, PyInline lets you do things like this:

from PyInline import C
import __main__

# Let's put some C code "inline" with our Python:

x = C.Builder(code="""

#include <stdio.h>
void ja(char *str) {
  printf("Just another %s hacker\n", str);
}

""", targetmodule=__main__) # Add C methods to the __main__ module.

x.build()
ja("Inline")
---

PyInline is the Python equivalent of
Brian Ingerson's Inline module for Perl (http://inline.perl.org),
which was awarded the "Best Module" award at this year's Perl
Conference.

More information about PyInline can be found at the PyInline home page
on
SourceForge:

   http://pyinline.sourceforge.net

To discuss PyInline further, please join the pyinline-discuss mailing
list at
http://lists.sourceforge.net/lists/listinfo/pyinline-discuss
-- 
http://mail.python.org/mailman/listinfo/python-list