mad city wrote:
Thanks. Good advice.
From the quickstart project, the embedded.cpp file function
void exec_file_test(std::string const &script)
{
std::cout << "running file " << script << "..." << std::endl;
// Run a python script in an empty environment.
python::dict global;
python::object result = python::exec_file(script.c_str(), global,
global);
I'm not sure who suggested this, but I don't think this works, if the
script runs anything interesting, as the builtin stuff is missing. (See
the other mail for how to do it right.)
Thanks,
Stefan
--
...ich hab' noch einen Koffer in Berlin...
_______________________________________________
Cplusplus-sig mailing list
Cplusplus-sig@python.org
http://mail.python.org/mailman/listinfo/cplusplus-sig