Trying to embed python into C, help!
disgracelands at quietblue.co.uk
Sun Aug 10 16:18:40 CEST 2003
I've been looking at using python and it's been going fairly well so far, i
can call C from python and python from C fine but now i've hit a snag and
i'm wondering how you guys have got around it.
I have to initialise python inside my C project so that i can make calls to
python modules whenever i need to but i can't create a dll for the project
as it's got to produce an exe or at least a lib so that i can execute the
initialisation code. The only way around it would seem to be to create a
separate dll project containing the python callback code that can then
import it to python and have my C code load it too. The problem with this
approach is that i'm doubtfull that the storage space for the callbacks will
be consistant between the python using the dll and C loading it. Basically
i *think* that i won't be able to get the callback data from python to C.
I know theres got to be a way around it but apart from the above i haven't
got a clue. Any help would be appreciated.
More information about the Python-list