The Living Thing

Python

My universal swiss army knife of coding tools. Excellent (that is, fast) matrix/array library, general scientific tools, interoperation with everything else - wraps C, C++, Fortran, comes with web servers, HTTP clients, parsers, google backing and thriving community. Fast enough, easy to debug, garbage-collected. An excellent choice if you’d rather get stuff done than spend time writing code.

I do my stats in R, my user interface in javascript, my inner loops in C, but python is the thread that stitches Frankenstein’s monster together.

Historical note: I used to work on producing python code all day long for the Powerhouse Museum with Seb Chan, using django on the AboutNSW project. Good times. (Yes, I am excellent at web development, and no, I’m not building websites these days. Bigger fish to fry.)

Pro tips for scientific python

greenlets

If you are working with embarrassingly parallel simulations like I am you might find yourself farming work off to subprocesses on your mid-scale problems. For this kind of unpredictable asynchrony (or, for that matter, networking, user interactions or any kind of IO) your control flow is made much easier by greenlets (a.k.a greenthreads/coroutines). I recommend the gevent package myself, which also monkey patches in some neat concurrency.

building it

If you are running on a ubuntu machine, everything in scientific python installs automagically through the package manager. If you are running more of a grumpy-old-man OS such as Windows, Red Hat Enterprise Linux or Mac OS, or if you don’t have access to the package manager, you might have problems, especially if you are determined to have 64 bit builds and a GUI.

I have a couple of preferred workarounds

To investigate:

Recommendations:


blog comments powered by Disqus