odd behaviour with embedded python and omniorb

Paul pcaffrey at iel.ie
Fri Mar 26 10:40:45 EST 2004


Hi Duncan

Duncan Grisby <duncan-news at grisby.org> wrote in message news:<c7ee2$4064176f$51604868$1150 at nf2.news-service-com>...
> In article <6c5f2ab0.0403250846.6e773bb0 at posting.google.com>,
> denginere <denginere at hotmail.com> wrote:
> 
> >I have a situation where I am embedding python in c++ and
> >calling omniorb within python.
> 
> You're better off asking this kind of question on the omniORB mailing
> list.
> 
> >c++ -> python -> c++ -> python
> >
> >The python is called using the following
> >    // Import the module/script
> >    pTmpModule = PyImport_Import(pName);
> >    PyObject_CallObject(pFunc, pArgs);
> >
> >If we call python once it's fine
> >If we call python a second time (as above) it fine *mostly*
> >
> >However if we call python a second time, *and* import omniORB
> >the PyImport_Import fails!
> 
> How does it fail?
y", line 4, in ?
    from omniORB import CORBA
  File "./__init__.py", line 357, in ?
ImportError: No module named omni_func



> 
> Are you reinitialising the Python interpreter between calls into it?
> If so, you might want to try the CVS version of omniORBpy since it has
> some fixes for that situation.
I think the answer it no: The second time we use a different Python context

> 
> Cheers,
> 
> Duncan.



More information about the Python-list mailing list