[omniORB] OMNIpy and importing _GlobalIDL

Duncan Grisby dgrisby@uk.research.att.com
Mon, 14 Aug 2000 10:00:16 +0100


On Friday 11 August, Jared Lee Peterson wrote:

> I have a question concerning importing the proper things for omnipy.  I
> am trying to run a script in cgi-bin that will interact with some CORBA
> objects and I need it to import _GlobalIDL but if _GlobalIDL is not in
> it's current directory it bombs out.  I have tried doing a
> sys.path.insert() before trying to import but that does not seem to
> work.  Is there some way that I can set this up to where I can have all
> of my omnipy stuff in one place but insure that scripts throughout the
> system can import things properly?  I am on a Linux box if that helps.
> I don't want to have to dump all of this is site-packages if I can don't
> have to.

As long as all the packages which omniORBpy requires are on sys.path,
everything should work fine. If you have moved the _GlobalIDL
directory elsewhere, you need to make sure you have also moved the
stub file. For IDL file foo.idl, the stub file is called foo_idl.py.
You also need to have the paths to _omnipymodule.so and all the
omniORB Python files on sys.path.

I don't know why it isn't working for you. Can you send a traceback
which shows the import error?

Cheers,

Duncan.

-- 
 -- Duncan Grisby  \  Research Engineer  --
  -- AT&T Laboratories Cambridge          --
   -- http://www.uk.research.att.com/~dpg1 --