From: Ken S. <ksi...@tt...> - 2001-08-29 23:07:56
|
Hi PyInliners, FYI, the latest and greatest PyInline is always available via CVS. To check PyInline out, use the following commands from your terminal: cvs -d:pserver:ano...@cv...:/cvsroot/pyinline login cvs -z3 -d:pserver:ano...@cv...:/cvsroot/pyinline \ co PyInline i.e., your CVSROOT should be set to :pserver:ano...@cv...:/cvsroot/pyinline Once you have checked PyInline out, you can use "cvs update" from the PyInline directory to make sure you always have the latest version. Also... Today I added a build() function to the PyInline module, which insulates you from some of the complexity of building a chunk of inlined code. build() creates a Builder object and then calls build() on that object to make your code. The biggest change with build() is that you now pass in not only your code chunk but also the language your code is written in. build() finds the right PyInline language module and handles setting up and building your code with that module. For example: import PyInline m = PyInline.build(code=r""" #include <stdio.h> void ja(char *str) { printf("Just another %s hacker\n", str); } """, language="C") # And this is written in C. m.ja("Inline") Comments and criticisms are always welcome :) TTUL Ken -- import PyInline PyInline.build(code=r'void ja(char* s){printf("Just another %s hacker\n",s);}',\ language='C').ja("Inline") |