Re: Development Update
Ian Ward <ian <at> excess.org>
2006-12-08 02:26:01 GMT
Rebecca Breu wrote:
> That reminds me: I tried to rewrite some of the code you suggested in C.
> That seems to work as long as I import the c-module into python. Becoming
> jaunty, I wanted to write a fancy c-api for my c-module, as they suggest
> it in the tutorial on python.org. But if I try to call a function via the c-api
> I get a segmentation fault. :(
> At the moment I don't have much time to look any closer at the bug. I only
> know that calling my function is the reason, the code inside my function
> is never reached. If anyone wants to have a look, here is a very simple example
> that produces the same segmentation fault:
I had to install your module one of my site-packages directories because
the default sys.path doesn't include the current directory when you're
not in the python interpreter (and I didn't want to look up how to
change sys.path from C).
Also, "test" is already a module in the standard library and on my
system the standard library module gets imported instead of the one you
wrote, so I renamed the module "rbtest" and it worked.
BTW, what do you need the C API for? Isn't exporting functions to
python good enough?