Gabriel Genellina <[EMAIL PROTECTED]> wrote: > En Thu, 05 Jul 2007 01:19:32 -0300, Stuart <[EMAIL PROTECTED]> > escribió: > > > What command do you mean when you say "update main_dict with > > dlfl_dict"? > > I think Alex Martelly was refering to use main_dict.update(dlfl_dict) > (Python code) or PyDict_Update(main_dict, dlfl_dict) (in C code).
Yep. > > I tried PyObject *rstring = PyRun_String( cmd, Py_file_input, > > dlfl_dict, dlfl_dict ); > > This worked, but has the side effect of not allowing other commands > > like "execfile" > > The idea is to copy all items from dlfl_dict into main_dict, and use > main_dict for both globals and locals. Exactly. Alex -- http://mail.python.org/mailman/listinfo/python-list