[Tutor] Python to C++
Andreas Kostyrka
andreas at kostyrka.org
Tue Mar 25 16:33:21 CET 2008
Check out Cython or Pyrex. For a number of applications (performance
speedup, C interfacing) they provide a quite Pythonic experience.
Andreas
Am Dienstag, den 25.03.2008, 07:21 -0700 schrieb Tony Cappellini:
> Yes, but then you loose the clean Python readability, which is one of
> the strong points for using Python
>
>
> On Tue, Mar 25, 2008 at 2:46 AM, Andreas Kostyrka <andreas at kostyrka.org> wrote:
> > Well, not exactly. Mixing Python with C/C++ extends the "coverage" that
> > you can do with Python.
> >
> > Andreas
> >
> >
> > Am Montag, den 24.03.2008, 23:39 -0700 schrieb Tony Cappellini:
> >
> >
> > > Another alternative is Weave
> > > http://www.scipy.org/Weave
> > >
> > > But mixing C/C++ with Python sort of defeats the reasons for using
> > > Python to begin with
> > >
> > > Message: 2
> > > Date: Sat, 22 Mar 2008 02:44:54 +0100
> > > From: Eike Welk <eike.welk at gmx.net>
> > > Subject: Re: [Tutor] Python to C++
> > > To: tutor at python.org
> > > Message-ID: <200803220244.54377.eike.welk at gmx.net>
> > > Content-Type: text/plain; charset=utf-8
> > >
> > > On Friday 21 March 2008 23:37, Dinesh B Vadhia wrote:
> > > > Thank-you for all the suggestions for converting to C/C++ which
> > > > will be followed up.
> > > >
> > > > Can we interface Python to a C++ library and if so how?
> > > >
> > > > Dinesh
> > > >
> > >
> > > If you have only few classes / member functions Boost-Python is a good
> > > solution.
> > > http://www.boost.org/libs/python/doc/
> > >
> > > I heard that SWIG can also generate glue code for C++.
> > > http://www.swig.org/Doc1.3/SWIGPlus.html
> > >
> > > You could also look at Py-QT they have a tool like SWIG (SIP I think),
> > > which they use to generate the glue code for the fairly big QT
> > > library. Maybe you like it better.
> > > http://www.riverbankcomputing.co.uk/pyqt/
> > > _______________________________________________
> > > Tutor maillist - Tutor at python.org
> > > http://mail.python.org/mailman/listinfo/tutor
> >
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Dies ist ein digital signierter Nachrichtenteil
Url : http://mail.python.org/pipermail/tutor/attachments/20080325/bf10611b/attachment.pgp
More information about the Tutor
mailing list