Python is a great programming language, and I am heavily into using it to solve a variety of problems. One of the nice things is that Python has modules written for every possible task (interacting with Unix OS, php, even Fortran) and so one can leverage off of a large community that has written probably what you need (or nearly) already and its freely available. Unlike CSH or Perl, the language elements are very readable so that someone can very quickly figure out what is going on and probably even alter the code.
Python has an excellent set of language features, including:
- Built in ability to interface to Fortran-90, C, C++, and Objective-C modules through the CXX, SWIG and Pyfort utilities
- Completely open source and freely distributable under GPL
- Runs on almost all available platforms (Unix, Mac, Windows, NT, Linux)
- An object orientated programing model
- Built in ability to interface to Fortran-90, C, C++, and Objective-C modules through the CXX, SWIG and Pyfort utilities
- Has a large community developing and maintaining source modules
- Can be implemented as a scripting language as well as a program language
- Has numerical, scientific, Tkinter/GUI bindings and modules for doing a wide variety of tasks
- Is simple to learn
Python in scientific computing: Advocacy
- Improving Scientific Productivity using Python: An example from an Ensemble Data Assimilation System in Meteorology (.pdf, 1.07 MB)
PDF slides from an a talk I gave on Oct. 20, 2006 to NWC NWP/Data Assimilation and Convective Dynamics seminar group the uses of Python in our scientific work within our data assimilation group.
Python reference books I use
- Learning Python, Mark Lutz and David Ascher, O'Reilly Publishers.
This is an excellent overview book which can get you started. I have the 1st edition, and there is an updated one out, but I actually like the 1st edition better. Nevertheless, I use it often. - Python (Visual Quick Start Guide), Chris Fehly, Peach Pit Press.
Once you know the language to a certain degree, this book is full of examples of small bits of code to do all the little tasks needed to create a bigger piece of code. I use this a lot just for a reference. - Python Scripting for Computational Science, Hans Petter Langtangen, Springer
If you liked the lecture notes from Dr. Lantangen, then buy the book. This has about all you need to know about using Python in scientific programing. Once you know the language to a certain degree, this book is full of examples of small bits of code to do all the little tasks needed to create a bigger piece of code. I use this a lot as a algorithm reference.