Testing times for Python
One of the more important phases in the development of a product is the testing. Even if the product has little software in it, software is invariably involved in the testing process. It may be controlling test equipment, providing simulated input or analysing internal data structures.
There are many programming languages that can be used, and they all have strengths and weaknesses. One that is well worth considering is Python.
The main Python website describes Python as a "powerful dynamic programming language" that "is often compared to Tcl, Perl, Ruby, Scheme or Java". It is an object-oriented language that is supported by an extensive set of libraries. The scope of these libraries is perhaps the most attractive feature of Python.
In recent projects Plextek has made extensive use of the SciPy and NumPy mathematical packages for generating test data and for verifying the data produced by the signal processing embedded in a number of products. The wyPython library was useful in generating a simple GUI that allowed regression tests to be controlled and their output to be inspected and logged. The PyVISA package enables you to control all kinds of measurement equipment through various busses (GPIB, RS232, USB).
Learning the basics of Python is relatively straightforward. There are many tutorials available online and, once the structure of a Python script (or module) is understood, a programmer familiar with structured languages should make good progress.
The fact that indentation is significant rather than aesthetic can lead to some early confusion, but most programmers soon develop a layout discipline that prevents problems. The Python Enhancement Proposal (PEP) number 8 provides a style good for Python coding that is well worth reading.
Python is available on most operating systems. There are plug-ins for Eclipse and Visual Studio as well as a number of dedicated IDEs that support GUI application development. It can be easily extended either with modules written in C or C++ application so that Python modules can be used to customise the functionality at run-time.
Contact Us
|