Re: [Tutor] Python to C++

2008-03-25 Thread Andreas Kostyrka
t; > Python to begin with > > > > > > Message: 2 > > > Date: Sat, 22 Mar 2008 02:44:54 +0100 > > > From: Eike Welk <[EMAIL PROTECTED]> > > > Subject: Re: [Tutor] Python to C++ > > > To: tutor@python.org > > > Message-ID:

Re: [Tutor] Python to C++

2008-03-25 Thread Tony Cappellini
n to begin with > > > > Message: 2 > > Date: Sat, 22 Mar 2008 02:44:54 +0100 > > From: Eike Welk <[EMAIL PROTECTED]> > > Subject: Re: [Tutor] Python to C++ > > To: tutor@python.org > > Message-ID: <[EMAIL PROTECTED]> > > Content-Typ

Re: [Tutor] Python to C++

2008-03-25 Thread elis aeris
w.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 <[EMAIL PROTECTED]> > > Subject: Re: [Tutor] Pyt

Re: [Tutor] Python to C++

2008-03-25 Thread Andreas Kostyrka
efeats the reasons for using > Python to begin with > > Message: 2 > Date: Sat, 22 Mar 2008 02:44:54 +0100 > From: Eike Welk <[EMAIL PROTECTED]> > Subject: Re: [Tutor] Python to C++ > To: tutor@python.org > Message-ID: <[EMAIL PROTECTED]> > Content-Type: text/pl

Re: [Tutor] Python to C++

2008-03-24 Thread 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 <[EMAIL PROTECTED]> Subject: Re: [Tutor] Python to C++ To: tutor@python.org Mess

Re: [Tutor] Python to C++

2008-03-21 Thread Eike Welk
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.

Re: [Tutor] Python to C++

2008-03-21 Thread Dinesh B Vadhia
Gauld" <[EMAIL PROTECTED]> Subject: Re: [Tutor] Python to C++ To: tutor@python.org Message-ID: <[EMAIL PROTECTED]> Content-Type: text/plain; format=flowed; charset="iso-8859-1"; reply-type=original "Dinesh B Vadhia" <[EMAIL PROTECTED]> wrote > Say because

Re: [Tutor] Python to C++

2008-03-20 Thread Chris Fuller
On Wednesday 19 March 2008 18:52, Dinesh B Vadhia wrote: > Say because of performance, you might want to re-write/convert Python code > to C++. What is the best way (or best practice) to do this wrt the tools > available? > > Dinesh You also might want to use some profiling tools, or skip that st

Re: [Tutor] Python to C++

2008-03-20 Thread Alan Gauld
"Dinesh B Vadhia" <[EMAIL PROTECTED]> wrote > Say because of performance, you might want to re-write/convert > Python code to C++. What is the best way (or best practice) > to do this wrt the tools available? It may be obvious but its worth noting that optimised Python may be faster than a ba

Re: [Tutor] Python to C++

2008-03-20 Thread Andreas Kostyrka
If you need to rewrite Python code for performance, I'd recommend using Pyrex/Cython. (www.cython.org). It let's you get away with small changes to your code as a starter (Cython is relative compatible syntax-wise with Python), and you can add "C type annotations" as needed. (And no, C++ is not co

Re: [Tutor] Python to C++

2008-03-19 Thread Michael Langford
Weave is probably what you really want to do, although it doesn't do what you said: http://wiki.python.org/moin/weave Pyrex actually does what you said: http://wiki.python.org/moin/Pyrex On Wed, Mar 19, 2008 at 7:52 PM, Dinesh B Vadhia <[EMAIL PROTECTED]> wrote: > > > Say because of performance, y

[Tutor] Python to C++

2008-03-19 Thread Dinesh B Vadhia
Say because of performance, you might want to re-write/convert Python code to C++. What is the best way (or best practice) to do this wrt the tools available? Dinesh ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] Python to C?

2006-01-02 Thread Alan Gauld
>Is there any way to convert a program in .py to .c? other then remakeing > the program? Thee are a couuple of projects designed to make Python run faster which try to convert Python to something like C and compile it but its not a general solution and the C produced isn't in any way readable. I

[Tutor] Python to C?

2006-01-01 Thread Eli Zabielski
Is there any way to convert a program in .py to .c? other then remakeing the program?Eli Zabielski ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor