How to create and interactive, distributable program?
Cameron Laird
claird at lairds.com
Mon Nov 11 11:24:14 EST 2002
In article <YzOz9.16974$Bs5.597636 at news1.tin.it>,
Alex Martelli <aleax at aleax.it> wrote:
>Kenneth Gomez wrote:
>
>> Hello all,
>>
>> In my course, I am asked to develop a basic finite element analysis
> [ snipped: some fundamental FEA specs ]
>> To do all of this, my questions are , can Python handle the
>> mathematics, e.g. does Python have a subroutine to inverse a matrix,
>> or find the modulus of a number,....? Or, is it like C, where I have
>> to write the subroutine myself?
>
>Python is a good language for numerically-intensive programming
>*IF* accompanied by the indispensable Numeric extension package
>(and possibly further add-ons to Numeric). So, basically just
.
.
.
>If I were in your shoes, with an extremely aggressive schedule
>and a LOT of things to be done within that schedule, I'd choose
>the best tools (Python, Numeric, SciPy, Qt, BlackAdder), give
>up on ALL the non-absolutely-essential parts (the tidbit about
>bundling everything up into an executable file just for a
>presentation seems non-essential to me, for example), and try
>to stick to Extreme Programming principles as much as feasible
>(e.g., the 40-hours-per-week principle does NOT seem feasible
>under the given constraints and goals -- nor is pair programming
>going to be, if you'll be working alone). Working in short
>iterations and boiling deliverables down to specs (expressed
>as automated, executable, repeatable tests) and executable code
>gives you your best chance to have something usable (though not
>probably yet complete) within your deadline.
>
>
>Alex
>
Alex is accurate and comprehensive, as always.
Perhaps there's value in emphasizing a few of his points.
If you had specific license constraints, I might recommend
falling back on Tkinter in place of PyQt. I doubt that
Tkinter will satisfy you in other ways, though--mostly
the performance of naive use of its Canvas ...
Introduce yourself to Python by starting with one of
* the computational engine and
* the GUI
in your first weeks.
Alex is entirely serious in expecting you to plan deliver-
ables seriously, to the point of coding executable
validations. Perhaps even before you think about the
two bulleted items above, you should learn of Python's
testing facilities (PyTest and more--I should start a Wiki
page on this ...; in the meantime, see <URL: http://
phaseit.net/claird/comp.lang.python/doctest.html >).
There's a chance you won't "need" Numeric for performance.
I'm still mulling over how to articulate advice on this.
Please be aware that others working in FEM have already
made serious use of Python. I rather doubt at this point
that you're best off trying to re-use their work directly.
However, I suspect there's value to you in knowing of this
"existence proof" of Python's feasiblity in the role you're
considering.
I predict you'll find yourself FAR happier at the end of
this projects with Python than C or Fortran.
--
Cameron Laird <Cameron at Lairds.com>
Business: http://www.Phaseit.net
Personal: http://phaseit.net/claird/home.html
More information about the Python-list
mailing list