[omniORB] Python Embedded

Duncan Grisby duncan@grisby.org
Fri Nov 15 17:59:01 2002


On Thursday 14 November, Leandro Fanzone wrote:

> CorbaScript has no means to be embedded inside a C++ program, and many
> of my scriptable applications ended having a separate CorbaScript server
> communicated with the C++ application through CORBA. Taking advantage of
> the Python capabilities, I thought that I might as well migrate those
> servers to an embedded Python script. Given that I already have the IDLs
> written to those scripts, I think it would be a good idea to write an
> omniidl backend to generate C++ stubs to the embedded scripts, hiding
> all the ugly details of the variable conversions et al, and keeping the
> IDL interfaces as a cleaner way to connect C++ with Python. Perhaps this
> was already done, and if not, I can donate the code in case someone may
> find it useful.
> Do you know of something similar already written?

You can easily embed Python in C++ or vice-versa and use omniORB to
communicate between CORBA objects in the two languages. They will use
an efficient in-memory transfer between the two languages. It isn't as
fast as directly using the Python / C API, but it's very clean and
easy.

There is an embedding demo in examples/embed in the omniORBpy
distribution.

Cheers,

Duncan.

-- 
 -- Duncan Grisby         --
  -- duncan@grisby.org     --
   -- http://www.grisby.org --