Python and SWIG - passing object pointer param to an embedded script.
Phlip
phlip_cpp at my-deja.com
Wed Mar 28 15:26:04 EST 2001
Andrew Bonello wrote:
> PyDict_SetItemString( globals, "myobjptr", myobj);
>
> PyObject* obj = PyRun_File( fp, (char*)fn, 0, globals, locals );
>
> This just causes an access violation. (I am using Microsoft Visual C++
> V6.0 with Python V2.0, Debug build).
We ran with SWIG for a spell, and then I auditioned the Boost Python
Library (www.boost.org) and never looked back.
For a way-cool example of reflection in native C++ without any extra
parsers or mucking Boost rocks.
--
Phlip phlip_cpp at my-deja.com
============== http://phlip.webjump.com ==============
-- It's a small Web, after all... --
More information about the Python-list
mailing list