| Store | Cart

RuntimeError: cannot unmarshal code objects in restricted execution mode

From: Denis S. Otkidach <o...@strana.ru>
Thu, 11 Mar 2004 16:33:26 +0300 (MSK)
When I execute python code from C++ application with
PyEval_EvalCode and this code contains imports of other modules
then I got the error "RuntimeError: cannot unmarshal code objects
in restricted execution mode".  How can I switch into
noraml (unrestricted) mode?

Python 2.2.2, Linux. Actual code looks like the following:

tstate = Py_NewInterpreter();
main_module = PyImport_AddModule("__main__");
main_dict = PyModule_GetDict(main_module);
obj_res = PyEval_EvalCode(calc_code, main_dict, main_dict);

-- 
Denis S. Otkidach
http://www.python.ru/      [ru]

Recent Messages in this Thread
Denis S. Otkidach Mar 11, 2004 01:33 pm
Denis S. Otkidach Mar 11, 2004 02:14 pm
Jeff Epler Mar 11, 2004 02:42 pm
Messages in this thread