By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
455,441 Members | 1,772 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 455,441 IT Pros & Developers. It's quick & easy.

odd behaviour with embedded python and omniorb

P: n/a
I have a situation where I am embedding python in c++ and
calling omniorb within python.

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!

Any thoughts appreciated
Jul 18 '05 #1
Share this Question
Share on Google+
3 Replies


P: n/a
In article <6c**************************@posting.google.com >,
denginere <de*******@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?

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.

Cheers,

Duncan.

--
-- Duncan Grisby --
-- du****@grisby.org --
-- http://www.grisby.org --
Jul 18 '05 #2

P: n/a
Hi Duncan

Duncan Grisby <du*********@grisby.org> wrote in message news:<c7**************************@nf2.news-service-com>...
In article <6c**************************@posting.google.com >,
denginere <de*******@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.

Jul 18 '05 #3

P: n/a
In article <bf**************************@posting.google.com >,
Paul <pc******@iel.ie> wrote:
How does it fail?

y", line 4, in ?
from omniORB import CORBA
File "./__init__.py", line 357, in ?
ImportError: No module named omni_func


That's fixed in CVS. Get the CVS contents or the latest nightly
snapshot and the problem should go away.

Cheers,

Duncan.

--
-- Duncan Grisby --
-- du****@grisby.org --
-- http://www.grisby.org --
Jul 18 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.