Andrew Borley wrote:
[snip]
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.
Andy,
I just tried it on my Redhat Enterprise Linux 4 with Python 2.3 and it
works well after just minor changes to configure.ac and Makefile.am
(checked in under revision r439534). Very nice!
To build it on linux, you need to declare the following variables:
export PYTHON_INCLUDE=/usr/include/python2.3 for example (look for
Python.h on your particular Linux distro).
export PYTHON_INCLUDE=/usr/lib assuming that libpython-2.3.so is in
/usr/lib.
I also changed Makefile.am in the Calculator sample to copy all .py
files to the deploy directory. I think it would be nice to have a new
sample demonstrating the capabilities of this new python extension.
I also like the the way you allow either just a module or a module plus
a class in <implementation.python>, and thinking that it should work for
Javascript as well. I will propose to change <implementation.js> to
follow the same idea in a different email.
--
Jean-Sebastien
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]