Embedding problem

Jp Calderone exarkun at mudprovider.com
Tue Nov 14 18:31:54 CET 2000

Alex Martelli wrote:
> "Jp Calderone" <exarkun at mudprovider.com> wrote in message
> news:3A10A113.5144672 at mudprovider.com...
> [apparently using C++ code, for the convenience of
> 'just-in-time definition' of variables -- or maybe
> a C99 compiler...?  Either way, I'll follow suit...]:
>     [snip]
> >    PyObject* result = PyRun_String(code, 0, globals, locals);
>     [snip]
> > to figure out what, or how.  I'm also not quite clear
> > on the second arg. to  PyRun_String.. What's "start"?
> One of the symbols:
>     Py_eval_input
>     Py_file_input
>     Py_single_input
> see chapter 2 in the Python/C API Reference Manual.
> > [snip]

 Oops, I read that section 3 times at least but somehow
the use of those didn't register...

Changed some stuff around, as you suggested, and it 
works just dandy now :)  One more question, is there 
any way to get rid of the  "Print left references? [ny]" 
prompt?  I'm not positive, but I think it's going to 
end up screwing with some of the shutdown code.  Getting
rid of the call to Py_Finalize() does away with it, but
that doesn't strike me as the best solution...

 Thanks again,

 Jp Calderone

More information about the Python-list mailing list