The goal of this book is to teach computational scientists and engineers how to develop tailored, flexible, and efficient working environments built from small programs (scripts) written in the easy-to-learn, very high-level language Python. The focus is on examples and applications of relevance to computational science: gluing existing applications and tools, e.g. for automating simulation, data analysis, and visualization; steering simulations and computational experiments; equipping programs with graphical user interfaces; making computational Web services; creating interactive interfaces with a Maple/Matlab-like syntax to numerical applications in C/C++ or Fortran; and building flexible object-oriented programming interfaces to existing C/C++ or Fortran libraries. In short, scripting with Python makes you much more productive, increases the reliability of your scientific work and lets you have more fun - under Unix, Windows and MacIntosh.
The primary purpose of this book is to help scientists and engineers who work intensively with computers to become more productive, have more fun, and increase the reliability of their investigations. Scripting in the Python programming language can be a key tool for reaching these goals.
The term scripting means different things to different people. By scripting I mean developing programs of an administering nature, mostly to organize your work, using languages where the abstraction level is higher and programming is more convenient than in Fortran, C, C++, or Java. Perl, Python, Ruby, Scheme, and Tcl are examples of languages supporting such high-level programming or scripting. To some extent Matlab and similar scientific computing environments also fall into this category, but these environments are mainly used for computing and visualization with built-in tools, while scripting aims at gluing a range of different tools for computing, visualization, data analysis, file/directory management, user interfaces, and Internet communication. So, although Matlab is perhaps the scripting language of choice in computational science today, my use of the term scripting goes beyond typical Matlab scripts. Python stands out as the language of choice for scripting in computational science because of its very clean syntax, outstanding modularization features, good support for numerical computing, and rapidly growing popularity.