[C++-sig] Creating a python class from c++
James Healey
healeyjames at yahoo.co.uk
Wed Nov 15 19:16:55 CET 2006
PyFile_AsFile returns a ptr to a file object so that's
working as it should.
And how do i check the exception?
Do i need to do any thing with the dict that gets
passed into exec_file?
Regards.
Jimmy.
--- Stefan Seefeld <seefeld at sympatico.ca> wrote:
> 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...
> _______________________________________________
> C++-sig mailing list
> C++-sig at python.org
> http://mail.python.org/mailman/listinfo/c++-sig
>
Send instant messages to your online friends http://uk.messenger.yahoo.com
More information about the Cplusplus-sig
mailing list