Scripting lanuages for laboratory tests

Peter Hansen peter at engcorp.com
Sat May 4 23:14:45 EDT 2002


[Reposting since all my outbound news for the last week has been swallowed.
Originally posted April 28.]

Etta Makwetta wrote:
> 
> I am tring to decide on which scripting language to use in one of our
> laborities during testing procedures, and I don't really know what the real
> advantages and disadvantages are.  I have made the following list, and would
> like to know if anybody knows of any obvoius other advantages/disadvantages
> that Python has compared to Tcl.  Any other comments about Ruby, Perl etc.
> are also welcome.

I did the same search as you several years ago for a scripting language
capable of doing sophisticated factory automated testing in a telecom
company.  I ended up (rather quickly actually) choosing Python and not
for a millisecond have I had reason to regret that choice.  We now use
Python for effectively everything we can, rather than just as a "mere"
scripting language for testing.

It has led us quickly into using XML, wxPython, Zope (which itself
has revolutionized our internal processes in at least a few groups
of the entire company), and others.

> Python:
> 
> Pros: Object oriented, Modular (name scope etc), Portable, Overflow
> checking, Exception handling, Easy Embeddability (from c-functions), Easy
> Extension (to c-functions), Support for complicated data structures,
> Copyrighted but free

All that and more including much higher productivity for programmers, 
higher readability and maintainability.

> Cons: GUI slightly more complicated than Tcl, 

I agree with Alex' response to you on GUIs.  

> More to learn, 

Easier to learn too.  Python is considered by many to be one of
the easiest (if not /the/ easiest) to learn general purpose 
languages.

> Not support calling an arbitrary dll.
> Neither Tcl nor Python supports calling an arbitrary dll.  

Not true.  Python has "calldll" which we've used successfully to wrap 
several arbitrary DLLs, including one for a GPIB controller card in a
PC, used in factory automated testing.

> Tcl supports
> loading of dll's, however they must contain an initialisation procedure that
> translates the functions  to Tcl commands. If this is not an option, e.g. if
> you want to use a Win32 dll, a wrapper must be written for each dll. Similar
> conditions apply to Python. 

Well, hmm, that's what I just said.  Isn't that the same thing?  Are
you merely concerned about the difficulty of writing the wrapper?
It is rather easy...

-Peter



More information about the Python-list mailing list