Science, Science and Society, Technology

Python and science

Python, apart from being a type of roughly tubular slidey reptile known for swallowing large things, is also a programming language.

python logoAnd rather a good one, at that.

First released in 1991, its design philosophy was all about ease, flexibility and simplicity: easy to learn and easy to read/understand.  And, since then, it’s gained a growing number of fans who are quite happy to trumpet why they prefer it over languages like, for example, Java :)

It’s also dynamic, open source and free, which is seriously cool.

Anyhoo, my interest in Python was piqued recently by a couple of things - firstly, the absolutely excellent mix & mash competition.  Said competition uses, in its data mashup tutorial for beginners, Python*.  Additionally, I spent much of last weekend at Kiwi PyCon**: NZ’s annual conference on all things python.

And, fascinatingly, I’ve discovered that Python is gaining increasing use in the scientific community, and not just amongst computer scientists!  It’s being used for a number of things, including:

  • getting one’s benchtop instruments to talk to each other
  • machine learning (PyBrain)
  • plotting of data (matplotlib etc)
  • signal processing, image processing, Fourier transforms, optimisation, linear algebra and so forth (SciPy)
  • N dimentional array manipulations (NumPy)

I’ve only _just_ started learning Python, So I’ve not got much to say that’s terribly educated on the subject.  However, at the conference I was impressed by the really wide range of applications for which it’s used, and the close feeling of community and commitment amongst those who use it.  It also, apparently, has great support (which can be an issue with open source software).

VUW/MacDiarmid Institute student Shrividya Ravi, who is doing her PhD in materials science and uses Python herself, has written this great piece on how and why a scientist might use Python.

Other articles on how and it’s used can be found below:

Ruby, Python, and Science — The Endeavour

“Should I switch to Python?”

Python for Scientists

If you’re interested, I’d thoroughly recommend getting in touch and signing up with the NZ Python Users Group, NZPUG.  It’s a great way to share questions and knowledge with other users, and based on what I saw at PyCon, these are good people.  And supporting good people is a good thing :)


More information

Wikipedia article on Python

Get Python here


* For those interested in learning how to DO this data mashup thingie, there’s a free workshop in Wellington _this Friday_.  I’mma be there :)

** And mad props to the PyCon organisers for inviting me, and letting me take along fellow SciBlogger Elf Eldridge!