For your pleasure, I have started the implementation of an Inline
equivalent for Python. PyInline lets you do things like this in a Python
script (horror!):
from PyInline import C
import __main__
C.Builder(code="""
#include <stdio.h>
void ja(char *str) {
printf("Just another %s hacker\n", str);
}
""", targetmodule=__main__).build()
ja("Inline")
---
Not quite a one-liner, but close for Python :)
To get started, ensure you have Python 2.1 installed on your system and
download PyInline from:
http://ttul.org/~ksimpson/PyInline/PyInline-0.01.tar.gz
Then untar the file, cd into the PyInline-0.01 directory, and run "python
setup.py install" as root.
This is an extremely early release, meant primarily to kickstart a
discussion within the community which will guide PyInline's development.
TTUL
Ken
---
Improve Python with Inline!
http://ttul.org/~ksimpson/PyInline