[omniORB] OmniORBpy and packaging

Laurent Pointal laurent.pointal@lure.u-psud.fr
Wed, 03 Jan 2001 15:38:22 +0100


First, its the time, so happy new year to all omniorb lists readers.


Here is just a note about a problem I found.

I use the stubs generated by OmniORB from an IDL interface as a part of a 
larger Python package.

So, the file structure is as this:
<dir>/myPackage/__init__.py
<dir>/myPackage/myInterface.idl
<dir>/myPackage/myInterface_idl.py
<dir>/myPackage/myInterface\__init__.py
<dir>/myPackage/myInterface_POA\__init__.py

And <dir> is in the python path.

In this structure, myInterface\__init__.py and myInterface_POA\__init__.py 
import myInterface_idl.py.
The problem is that myInterface_idl.py is not itself in the python path, it 
must be called with import myPackage.myInterface_idl to be found with the 
current path.

A solution may be to have myInterface\__init__.py and 
myInterface_POA\__init__.py to dynamically update sys.path to ensure it 
contains their parent directory, and then import myInterface_idl.py.


As a short-cut solution, I moved generated stubs directly in <dir>.


A+

Laurent.


---
Laurent POINTAL - CNRS/LURE - Service Informatique Experiences
Tel/fax: 01 64 46 82 80 / 01 64 46 41 48
email  : laurent.pointal@lure.u-psud.fr  ou  lpointal@planete.net ou 
laurent.pointal@laposte.net