Hi all,

The implementation.python extension code is now checked in, alongside an
updated Calculator sample that allows you to substitute the current C++
implementation of DivideService for a Python one - see the Python module in
samples/Calculator/CalculatorComposite/DivideServiceImpl.py and the
commented-out blocks in
samples/Calculator/CalculatorComposite/CalculatorComposite.composite. It all
works on Windows and I've updated the Linux makefiles but haven't got a
working local Linux box to try them out on - could someone try a build and
see what happens? For windows you need to have Python installed and the
PYTHON_HOME environment variable set to the installation dir. Also, I only
have MS VC7, so I haven't updated the VC6 project files to include the
extension.

A few issues came up when I was developing the extension:
1) The code currently depends on the CPP extension code, specifically for
the interface.cpp which is used by the extension just to get the scope and
remotable attributes. Are these two attributes specific to C++ interfaces or
are they generic enough to be put into the tuscany::sca::model::Interface
super-class?

2) I wanted to use the exceptions in osoa/sca/ServiceRuntimeException but
they've been moved into the C++ extension, so I basically took a copy,
slightly changed it and put that in the Python extension. I wonder if these
pretty generic exceptions should be in the SCA core instead of the C++
extension?

3) Ditto with the use of the declarations in osoa/sca/export.h. Should these
be in SCA core for anyone to re-use?

It was a pretty smooth ride to get this far, and it's pretty cool to be able
to drop in some Python code instead of a C++ dll, or expose a bit of Python
as a web-service :)

Next up is the bits identified in the "Extension matters" thread.

Cheers
Andy

Reply via email to