[omniORB] omniidl compiler and module name different than file name

Duncan Grisby duncan at grisby.org
Sun Sep 30 16:33:45 BST 2007


On Friday 28 September, Bogdan Jeram wrote:

> I think that omniidl compiler for python has some problem with
> generating code for cases when IDL modules are not defined in files with
> the same name.
> For example omniidl compiler assumes that
> module ABC
> {
> ....
> };
> 
> should be in ABC.idl

No it doesn't.

If your IDL looks like this, in file foo.idl

  module Bar {
    // ...
  };

then omniidl will generate three things. It will generate foo_idl.py,
which is an internal implementation detail. Then it will generate
directories Bar/ and Bar__POA/ containing __init__.py files that import
foo_idl, which are the packages required by the Python mapping standard.

[...]
> I think that, in case when file name and module name are different,
> compiler should generate python module for IDL module(s) (as it does
> now), in addition it should generate python module with the name of the
> file which import module(s) generated for IDL module(s).

That's exactly what it already does, and always has done.

Can you give a complete example of precisely what is causing you a
problem?  Include the IDL files and a directory listing showing the
output of omniidl.

Cheers,

Duncan.

-- 
 -- Duncan Grisby         --
  -- duncan at grisby.org     --
   -- http://www.grisby.org --



More information about the omniORB-list mailing list