[HomePage] [TitleIndex] [WordIndex

Python-based Scientific and Engineering Worktools

There are so many Python versions, add-ons, packages, development tools and applications, that you can put together a tailored set of tools, just right for any field of interest. The problem is that there are too many choices and combinations, and probably quite a bit of searching to end up with the perfect setup to do what you want.

It is nice for beginners to have a defined (and to some extent, prepackaged) starting point to get going in. After that, they can explore additional elements freely. This page describes a very good starting setup. Here we dwell on the Scientific and Engineering fields, particularly as suited to Process Control Engineering (not that there is much specific to this domain on this page).


We need three main elements to get going:


One of the most popular languages available today is Python, having strong object-oriented and functional-programming features. Even this web-site uses Moin-Moin, a python-based Wiki server. In conjunction with a set of "toolboxes", Python can take on similar functionality to Matlab. Because Python is a real, broad-base, popular programming language, you can extend your interactive algorithm tinkering to use other Python extensions to expand its capability or build a professional fully-fledged application with extras such as a GUI, backend database, or web-access. In this respect, Python is a much better base than Matlab, and Python is unrivaled in its array of extension modules which do most of the work to minimise the programming required. However, if you just want an open-source or free replacement look-alike for Matlab, then look at Octave and Scilab.


Science and Engineering Toolboxes

Python has ~20,000 packages/toolboxes registered with PyPI (The Python Package Index) including game libraries, encryption, web servers, ERP and Science and Engineering. Three packages are the primary starting point to Science and Engineering:

As an example of some of the capability of these pacakge, here's the packages or Toolboxes built into SciPy (which uses Numpy under the hood):

Integrated Development Environment

Probably the most popular and capable Python IDEs also happen to be open-source and free. PyDev builds on the popular Eclipse software platform (which itself has addons for everything from database browsing to java/C/fortran IDEs and GUI construction systems and ERPs). PyDev includes all the elements for a good IDE (syntax colouring editors, debugger, project/file/class browser), plus some really useful extras like background code checking, call signature and documentation hints on objects and functions of any package/module you may be using in that source file (even though you may not have run the file yet). It also has an interactive console to help test out code that you want to use.

However, some people are aiming at small-scale software development or just want to interactively process data and write reusable scripts which make this easier. For these users, Spyder (google spyderlib), a Matlab-like GUI, may be the best environment (although sparsely documented and still under rapid development). It is rather simpler to use and more oriented towards interactive use than PyDev (less initial "project" setup), but the IDE assistance is not as comprehensive as PyDev. However, being tailored for scientific and engineering use, Spyder, like the Matlab IDE, has lots of little features that help a great deal.


Getting It

Fortunately, someone has put all of this together for us in a single download that suits most scientists and engineers, so don't go searching around the web for all the different components that you might think you need.

Python(x,y), a new packaging of SciPy, numpy, and Spyder (with the important packages mentioned above, and many more useful ones that you'll get to know later) can be found on this link. This automatic installation of all the required packages makes installation very easy. On Windows, it also packages a nice utility to get access to all the tools through a task-bar applet.

Tips and Tricks for Python(x,y)

Other extensions or packages that might be useful

Note, some of these are already included in the default installation of Python(x,y)!

Documentation Starting Point

Look on the ? menu of Spyder for the main Python package documentation. In addition, here are some direct links to get started with:

Python Quick References

Process Control related/example files

Migrating from Matlab

2015-05-14 10:33