[omniORB] Passing a Sequence from Python to C++

EntonH entonh at gmx.de
Fri Feb 15 03:49:57 GMT 2008




EntonH wrote:
> 
> Hello,
> 
> I'm new to CORBA and Python and want to pass a sequence from Python to
> C++.
> 
> My IDL-file:
> 
> interface idlfile
> 	{
> 		
> 		struct param
> 		{
> 			string value1;
> 	   		             any value2;
> 
> 		};
> 
>                 typedef sequence param dict;
> 
> The generated code:
> Struct:
> class param:
> def __init__(self, value1, value2)
> 
> Sequence:
> class dict:
> def __init__(self, *args, **kw)
> 
> I want to initialize the params in this way:
> pm1 = idlfile.param("example1","example2")
> But I don't know how to initialize the sequence?
> 
> How do I initialize a sequence of params und how do I pass them to C++?
> Is it possible to put the sequence into a dictionary and to pass this to
> C++?
> 
> I want to call a function - implemented in a C++ - dll - for which the
> following code was generated:
> 
> def init(self, *args):
>         return _omnipy.invoke(self, "init",
> _0_FuncLibRepository.dataLogger._d_init, args)
> 
> I'm looking forward for your replies.
> 
> Greetings,
> EntonH
> 

-- 
View this message in context: http://www.nabble.com/Passing-a-Sequence-from-Python-to-C%2B%2B-tp15495850p15499626.html
Sent from the OmniORB - User mailing list archive at Nabble.com.




More information about the omniORB-list mailing list