[LWN Logo]
[LWN.net]
From:	 ksimpson@ttul.org (Ken Simpson)
To:	 python-list@python.org
Subject: PyInline Released: Put C source code directly "inline" with your Python!
Date:	 28 Aug 2001 11:05:59 -0700

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