Hi all, I want to make a value available to the global namespace of an embedded python interpreter. Several functions of the Python/C API feature a PyObject *globals and a PyObject *locals, so my guess is that these can be used for this purpose. Unfortunately, the Python/C API does not describe how this works.
If I want for example, to create a variable MyVar that can be read by the python code in some filename, to be run with PyRun_AnyFile();, how can I do this? Or do I misunderstand the API, and can Py_InitModule() register both functions *and* variables? (and how to register the variable then?) regards, Olivier (I know extending is the preferred solution, unfortunately I was not aware of this some years ago) ------------ And now a word from our sponsor ------------------ For a quality usenet news server, try DNEWS, easy to install, fast, efficient and reliable. For home servers or carrier class installations with millions of users it will allow you to grow! ---- See http://netwinsite.com/sponsor/sponsor_dnews.htm ---- -- http://mail.python.org/mailman/listinfo/python-list