Re: Examples of Python code compared to other languages

2005-10-30 Thread Nicolas Pernetty
On 29 Oct 2005 21:27:39 -0700, [EMAIL PROTECTED] wrote : > http://pleac.sourceforge.net/ probably is what you're looking for. It > shows how to to stuff from the perl cookbook in a plethora of other > languages, including Python. > > Kind regards Terji Petersen > Hello, As mentioned in the ori

Examples of Python code compared to other languages

2005-10-29 Thread Nicolas Pernetty
Hello, I'm looking (without success so far) for code sources for common problems in different languages, but especially Python, C, Fortran, Ada and Matlab. It would help people coming from other languages to understand the 'python way of thinking'. Priority is clean code, performance is not an i

Numeric array equivalent of index ?

2005-10-14 Thread Nicolas Pernetty
Hello, I'm trying to find a clear and fast equivalent to the index method of plain python list : >> a = [5,1,4,3,4] >> a.index(4) 2 I have to use it on a Numeric array, so the best I've come up with is (rather ugly I think) : >> from Numeric import array, equal, nonzero >> a = array([5,1,4,3,4])

Re: Continuous system simulation in Python

2005-10-11 Thread Nicolas Pernetty
de or > writing an interface to existing optimize simulation code. Although > most likely not suitable for your applicaion but a good example of > this type of program is Mathematica. It is written in two parts a user > interface and a kernel that does all of the high power math. > &g

Re: Continuous system simulation in Python

2005-10-10 Thread Nicolas Pernetty
n, fine, let's do the entire thing in Python/C. If we decided to go for Simulink, fine, let's do the whole thing in Simulink/Matlab/C. Matlab, for algorithms, can do almost the same things than Python and sometimes much better, so if you have already Simulink (and so have the license) why go for

Re: Continuous system simulation in Python

2005-10-09 Thread Nicolas Pernetty
Hello Phil, I'm currently looking to see if I can build upon SimPy, thus making it an hybrid system simulator. That would be a great step for the community. Main difficulty would be to build a framework which isn't clumsy, like you said. I have close to no experience in Python and object oriented

Re: Continuous system simulation in Python

2005-10-08 Thread Nicolas Pernetty
; Simulink is a framework widely used by the control engineers ... > It is not *perfect* but the ODEs piece is probably the best > part of the simulator. Why were you not convinced ? > > You may also have a look at Scicos and Ptolemy II. These > simulators are open-source ... but

Re: Continuous system simulation in Python

2005-10-07 Thread Nicolas Pernetty
chanical systems to solving partial > differentail equations. > > Howard > > Nicolas Pernetty wrote: > > Hello, > > > > I'm looking for any work/paper/ressource about continuous system > > simulation using Python or any similar object oriented lang

Re: Continuous system simulation in Python

2005-10-07 Thread Nicolas Pernetty
On Thu, 06 Oct 2005 22:30:00 -0700, Robert Kern <[EMAIL PROTECTED]> wrote : > Dennis Lee Bieber wrote: > > On Fri, 7 Oct 2005 01:12:22 +0200, Nicolas Pernetty > > <[EMAIL PROTECTED]> declaimed the following in > > comp.lang.python: > > > > > I

Re: Continuous system simulation in Python

2005-10-07 Thread Nicolas Pernetty
Hello Phil, Yes I have considered Octave. In fact I'm already using Matlab and decided to 'reject' it for Python + Numeric/numarray + SciPy because I think you could do more in Python and in more simple ways. Problem is that neither Octave, Matlab and Python offer today a framework to build conti

Continuous system simulation in Python

2005-10-06 Thread Nicolas Pernetty
Hello, I'm looking for any work/paper/ressource about continuous system simulation using Python or any similar object oriented languages (or even UML theory !). I'm aware of SimPy for discrete event simulation, but I haven't found any work about continuous system. I would like to develop a generi