[C++-sig] Re: Exposing C++ objects to Python at runtime

Niall Douglas s_sourceforge at nedprod.com
Mon Nov 24 18:46:55 CET 2003


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 24 Nov 2003 at 10:03, Jonathan Warrington wrote:

> > Boost.Python already does that.  Your module initialization function
> > executes at runtime.
> 
> Hmm, I don't think I made what I was looking for quite clear enough,
> sorry.  What I'd like to do, is register classes, and functions
> without using the Boost.Python macros, as I don't want to have
> Boost.Python dependencies in my other code.  I want to keep those
> dependencies in an wrapper, and not expose Python or anything to the
> other developers.
> 
> Hopefully this makes it a little more clear.  I'm having trouble
> expressing what I want as I'm not sure of the correct terminology for
> what I'm trying to do. :(

That's easy - you hatch out all the boost.python and python stuff 
into its own DLL. If you want an example, 
http://tnfox.sourceforge.net/ provides a TnFOX C++ library with no 
python knowledge and a wrapper DLL called TnFOX.pyd which provides 
python bindings for the C++ library.

Cheers,
Niall





-----BEGIN PGP SIGNATURE-----
Version: idw's PGP-Frontend 4.9.6.1 / 9-2003 + PGP 8.0.2

iQA/AwUBP8JED8EcvDLFGKbPEQKiDgCgnkb3XoIvY8odBloMYJ4TWnzVGdkAmweF
otYkPUzvAnTdI39h6zTr2JO1
=tzoL
-----END PGP SIGNATURE-----




More information about the Cplusplus-sig mailing list