From: Ken S. <ksi...@tt...> - 2001-09-06 21:48:33
|
> 1. It wold be cool if the generated C-code would contain > #line directives pointing into the correct location > into the python source file, but I doubt that it is > possible to do it automatically. Great idea. It will take some work to implement, though, so let's write it down for implementation during the next month or so. > 2. Currently you automatically wrap C-functions > by parsing their header. This is (nearly) trivial > for simple argument and return types, but impossible > for structured types. How will this be handled? I'm planning to implement a Python equivalent of Neil Watkiss' Inline::Struct module for Perl. Inline::Struct lets you define C structs which are automagically turned into Perl dictionaries when they pass into Perl land (and vice versa). > 3. Currently you import names in the module into > the current namespace. Wouldn't it be cool to write > > ... > PyInline.function(r""" > void ja(char *str) { > printf("Just another %s hacker\n", str); > } > """)("PyInline") Good idea. That ought not to be very difficult to implement (i.e., a few extra lines in PyInline/__init__.py). > or even > > class X: > meth = PyInline.method(r""" > void ja(PyObject *self, char *str) { > printf("Just another %s hacker\n", str); > }""") > > to define an instance method written in C? Great idea. TTUL Ken |