From: Phlip (pplumlee_at_[hidden])
Date: 2001-03-26 15:02:42
Proclaimed Karl Bellve from the mountaintops:
> But it appears that BPL must first create a python class in the first
> line before you can use the second line (m = n.getWorld(1)). In your
> example, you have hello::world, which has a function to construct a new
> hello::world (getWorld). But, using BPL, how do you load a preexisting
> c++ object, already contructed, into python? I assume you just can't do
> a "import object\n" and then use its functions? Basically, can you skip
> line one in your python code, and go straight to line 2?
Of course - just write a free function.
BPL hardcores will now tell you how to prevent Python from destroying that
object, in case your C++ code was fond of it.
-- Phlip phlip_cpp_at_[hidden] ============== http://phlip.webjump.com ============== -- MCCD - Microsoft Certified Co-Dependent --
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk