How to Copy a Dictionary from a C Extension?
Warren Postma
embed at geocities.com
Thu Apr 13 11:02:57 EDT 2000
I am embedding Python. I need to make a copy of the Globals dictionary when
I start a new session in my embedded system, then delete it, and recreate
it, so I can "drop" any changes to the globals after a remote session is
completed.
Problem: If you want to copy the existing Globals used by the interpreter,
what is the way to do this? I found pydict_copy in dictobject.c, but it's
static, so I can't invoke it directly.
Warren
More information about the Python-list
mailing list