Python's Suitability?

Kay Schluehr kay.schluehr at gmx.net
Tue Aug 28 08:53:03 CEST 2007


On 28 Aug., 02:28, mrc2... at cox.net (Michael R. Copeland) wrote:

>    Note that I'm not considering using the existing C/C++ code in my Web
> application, because I don't know how to write a C/C++ Windows
> application - and I'm sure the learning curve here is greater than
> Python's.  I'm a very old procedural-based application developer (47+
> years of programming experience), and developing Windows applications is
> beyond me.

As I see it you might separate the console frontend from your database/
model backend and reuse your database code. The next step would be
selecting a webframework that allows you to plugin your own database
driver which has to be wrapped into a Python module. For wrapping into
a Python module there are several alternatives. SWIG and BOOST.Python
are most natural solutions for wrapping C++ code and exposing its
functionality to Python. Other options are writing a C interface to
your database and use ctypes, Pythons stdlib FFI ( see Python 2.5
docs ). Not sure if there are tools yet to derive a C interface
automatically from C++ classes. If so I would prefer the FFI approach.
For database plugins: a framework like Pylons [1] seems to be
particularly suited for this option but I would recommend requesting
answers by the Pylons community directly.

[1] http://pylonshq.com/





More information about the Python-list mailing list