Rich Salz salzr at certco.com
Fri Aug 6 16:35:17 EDT 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?

More information about the Python-list mailing list