[omniORB] Trouble accessing existing CORBA service from Pytho n

Joel Wagner Joel.Wagner at veritas.com
Mon Apr 12 17:18:20 BST 2004


The IDL parameter is defined as unsigned long.  The value we pass for this
long comes from an enum that is in a .h file.  I'm planning on coming up
with something that will process the enums from the .h files on the fly so
that there won't be any extra manual steps to keep the .h's and .py's in
sync (similar to the way ImportIDL works).  The .h files are clean so will
probably just go with simple regex's as you suggest.

Thanks,

Joel

-----Original Message-----
From: Duncan Grisby [mailto:duncan at grisby.org] 
Sent: Monday, April 12, 2004 3:46 PM
To: Joel Wagner
Cc: omniorb-list at omniorb-support.com
Subject: Re: [omniORB] Trouble accessing existing CORBA service from Python 

On Wednesday 7 April, Joel Wagner wrote:

> One problem I've run into is that some enums used between client and 
> server were implemented in .h files.  Good or bad, this was done to 
> get around the CORBA IDL restriction that enums can not be assigned
values.

Do you mean that the IDL said enum, but you redefined the enum values
elsewhere?  If so, you won't be able to talk to the server directly since
omniORBpy will check that the enum values are in the range expected from the
IDL, not the values you have assigned them. The work-around will be to
redefine the IDL to use unsigned long.

> What possibilities exist for accessing the enums of a .h file from a 
> Python script?

You might have some luck with SWIG, but I don't know. Depending on how clean
your .h files are, you can probably do it with some simple regular
expressions.

Cheers,

Duncan.

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



More information about the omniORB-list mailing list