On Mar 23, 6:43 pm, Gal Aviel <[EMAIL PROTECTED]> wrote: > Hello all, > > Kinda desperate over here .. Any help would be greatly appreciated ! > > I'm trying to embed a Python interpreter inside a Verilog simulator as a > SystemVerilog DPI application. The python side implements a few SV exported > tasks. I've got a thin C shared library as the dpi app; all it does it get the > task arguments from the simulator and hand those to the Python side using the > Python C API. > > I followed '5.3 Pure Embedding' under Python 2.5 documentation very closely. > > When calling a function defined in my module, the function executes Ok - it > sees > the correct arguments being passed from C, and executes 100% - only the return > value is always 'None' (I tried returning a simple integer like '5' which > doesn't work). >
I met similar problems before and I guess you can try to start from a minimum version that f takes no arguments. If your can't pass the right argument to f, it will always return none without any prompt. -- http://mail.python.org/mailman/listinfo/python-list