[C++-sig] Re: should (how) I use Python to run my c++ classes

Niall Douglas s_sourceforge at nedprod.com
Fri Apr 9 01:51:32 CEST 2004


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 8 Apr 2004 at 19:02, David Abrahams wrote:

> > I've already written a lot of classes for medical image processing,
> > and now I'm using qt as GUI to put all together. But,  first of all,
> > qt isn't free under windows, plus I'm encountering several troubles
> > in putting together some libraries.

Qt is free for non-commercial use on Windows until v2.? - it's good 
enough for what you want.

> > So I though to Python as a
> > possible language by which to write the GUI (Tkinter) and call my
> > c++ classes. I've read quickly several parts of "learning Python"
> > (oreilly) and I got my idea is feasible and even suggested in the
> > introduction. But I don't know at all how to realize it... Of corse
> > I now I'll have to read a lot, but it would be nice to have a simple
> > example of a minimal python program calling a c++ class, maybe after
> > clicking on a tk button. In this way I would understand if at least
> > it can be useful for me before to start a timekeeping study.

There seem to be a lot of people wrapping medical software recently. 
If you have plenty of time in which to do this, moving as much of 
your project to being written in python as possible is a good idea. 
However in real world terms, if there's time constraints, best not 
stray too far from what you know already.

> I suggest, especially if you already have Qt interfaces, that you go
> with http://tnfox.sourceforge.net/TnFOX/html/, which also has a Python
> interface.

TnFOX only replicates the non-GUI part of Qt's API. FOX's API is used 
for the GUI bit!

> I know it's not the simple intro you wanted; maybe someone else can
> contribute that?

I attach TestPython from TnFOX below. I hope it helps.

Cheers,
Niall





-----BEGIN PGP SIGNATURE-----
Version: idw's PGP-Frontend 4.9.6.1 / 9-2003 + PGP 8.0.2

iQA/AwUBQHXlhMEcvDLFGKbPEQJIawCfSkBjAYoB9f1tbyelrhL+kQLaqXEAn2ev
4ua7RH1HmBHvIsxQaeVO3MXn
=2xzU
-----END PGP SIGNATURE-----




More information about the Cplusplus-sig mailing list