[C++-sig] Creating a python class from c++

Stefan Seefeld seefeld at sympatico.ca
Wed Nov 15 17:09:18 CET 2006


James Healey wrote:

> When I run the PyRun_File command result comes back as
> NULL. The only thing im doing before calling exec_file
> is Py_Initialize();

Check the exception python has set. It should tell you
why the execution failed. (Does the file actually
exist ? Can it be executed by python without error ?)

boost.python should actually translate that exception into
a C++ exception, which you can catch inside your C++ code...

HTH,
		Stefan

-- 

      ...ich hab' noch einen Koffer in Berlin...



More information about the Cplusplus-sig mailing list