Python bug?

Bernd Gehrmann bernd at physik.hu-berlin.de
Thu May 3 11:20:47 BST 2001


On Wed, 2 May 2001, Richard Dale wrote:
> This is very interesting/useful generally - do you think it would it be a good
> candidate for adding to the kdebindings module? 

In principle yes. They need some more testing though. Then we can
make a comparison with the approach in pythondcop. 

> Dynamic languages like python
> and java shouldn't need compile time IDL's to describe marshalling - it would
> show up their advantage over C++. 

Yup. The Python bindings for CORBA are very cool. On
http://orbit-python.sault.org, there is an example.

Unfortunately, it's not that easy with dcop. You can get
a list of function signatures from the server and marshal
simple arguments automatically (that's already done by
pythondcop). But with user-defined types, this becomes 
impossible. For example, if you have a

  struct Foo { int foo1; double foo2; };

and a method
 
  void Bar(Foo foo);

you can not find out (on the python side) how to marshal a
the Foo object. My approach makes a comprise: you can at
runtime do a pydcop.addMarshaller("Foo", mymarshaller)
to extend the capabilities of the bindings. myshaller
can be written in python. It's not as simple as could be,
but it's all that can be done without extending dcopidl
to extract more type information from the header files.

Bernd.


-
to unsubscribe from this list send an email to kdevelop-request at kdevelop.org with the following body:
unsubscribe »your-email-address«



More information about the KDevelop mailing list