Wednesday, October 5, 2011

Python for Engineers and Scientists

Is Python a suitable language for developing engineering/scientific applications?

Python programming language is versatile in a number of ways.
  1. It is object oriented but does not enforce programmer to adopt the OOP way. This is similar to C++, in that the programmer can choose to write either purely procedural programs (like in C), or pure object oriented programs (like in Java) or have a mix of the two.
  2. It is an interpreted language and hence is excellent at prototyping programs but being interpreted, is slower in execution.
  3. It is multi-platform and is available for Windows, GNU/Linux and *nixes.
  4. It has excellent numerical computation support in the form of NumPy and SciPy modules. NumPy provides multi-dimensioned arrays and SciPy provides large number of algorithms for numerical computation.
  5. It has excellent graphing capabilities in the form of matplotlib module.
  6. It has excellent libraries to build GUI applications, such as, wxPython, PyQT etc.
  7. Python applications can be distributed as stand-alone binary executables for Windows and Mac OS X using py2exe and py2app, making it possible to execute the applications even if Python interpreter is not installed on the user's machine.
  8. With a little bit of effort, it is possible to interface C code with Python where performance is an issue. It is also possible to embed Python within C programs.
Add to this the reputation Python has for its easy learning curve, you can begin to see the benefits it can have to the scientific and engineering programmer. The fact that mathematical software such as Sage and powerful 3D scientific visualization software Mayavi are written in Python should give an indication of what can be achieved.

No comments:

Post a Comment

Your comments are ciritical input for the sustainance and improvement of this blog.