Embedding Python with non-filesystem code source?

Ryan Oltman oltman at gmail.com
Tue Jan 13 10:23:46 EST 2009


Background:
I'm trying to develop some certification software in C/C++ that would
allow engineers/technicians to quickly develop scripts/functions in
Python to verify a product (there could be hundreds of functions per
product). I would like to use SQLite db to store the functions and the
necessary certification reference data.

Question:
I have successfully embedded python code in C/C++ using the
PyEval_CallObject when using a file as the module source,but is it
possible using the PyImport_ImportModule & PyObject_GetAttrString to
point to a non-filesystem source?  Is there another way to setup the
PyEval_CallObject that would allow this capability?

Ryan Oltman



More information about the Python-list mailing list