473,471 Members | 2,008 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

odd behaviour with embedded python and omniorb

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
3 1634
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
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
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Duncan Grisby | last post by:
omniORB 4.0.3 and omniORBpy 2.3 are now available. They are bug fix releases. Many thanks to all the people who have contributed bug fixes and features. omniORB is a robust, high performance...
3
by: Melissa Wallis | last post by:
I am using python and omniORB for a client program. The server is on another machine using an ACE TAO orb. I have been unable to figure out how to talk to a different naming service without using...
1
by: Melissa Wallis | last post by:
I have a class with 5 callbacks. Two of the callbacks work fine but the others don't. The main difference is that the callbacks that don't work are composed of a sequence of structs. I noticed a...
2
by: Luke | last post by:
Hi, I'm getting an OverflowError which doesn't make sense to me. Is this a python bug? Traceback (most recent call last): File "/home/demoau/lib/py/omniORB/__init__.py", line 717, in...
4
by: Phanish | last post by:
Hi, One of my customer wants me to use Python as a test scripting language. The architecture is as follows: An C++/Java UI obtains all required inputs from the user and then makes call to Python...
1
by: Birgit Rahm | last post by:
Hello newsgroup, is this the right group to ask about the logging of Corba while usingomniORB for Python? I know that there are 3 funktions in the Corba package. But I dont know, where I can...
3
by: Birgit Rahm | last post by:
Hello newsgroup, I work with omniORB for python and I what to log the calls, does anyone in this group know how I can do this? I use the command to initialize the ORB ORB =...
42
by: Gary Kshepitzki | last post by:
Hello I would like to create an API for a piece of Python code. The API is for use by non Python code. It should support interaction in both directions, both accessing functions on the API and...
6
by: rodmc | last post by:
Can anyone recommend an easy to install COBRA implementation which works with Python? I am using Windows XP. Thanks in advance. Best, rod
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
0
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.