embedding

Rich Salz salzr at certco.com
Fri Aug 6 22:35:17 CEST 1999


The following (excerpted, no error-checking)
 PyObject* mod = PyImport_AddModule("__main__");
 PyObject* mdict = PyModule_GetDict(mod);
 PyObject* obj = get_a_python_object();
 PyDict_SetItemString(mdict, "YOUR NAME HERE", pyd);

This seems simpler than Reilly's method.  So is my code wrong, or (gasp) is
there More Than One Way To Do It?
    /r$







More information about the Python-list mailing list