Dec. 2, 2004
11:09 a.m.
Terry Ware <terry.ware@baesystems.com> writes:
I work on windows platforms and I have a collection of C routines that are distributed via a DLL. These routines have embedded python calls. Currently I have to distribute the python modules separately from the C DLL. Is there a way using distutils for me to combine the python scripts with the C code in the C DLL so that all I have to distribute is my C DLL along with the pythonxx.dll?
You could create a zipfile from the modules you need, and append the zipfile to your C dll. Then, add the pathname of your dll to sys.path somewhere in your init code, and zipimport should do the trick. At least in principle ;-) Thomas