What is this Python/Programmability Stuff?

 

As of 14.0, there is a new feature in SPSS that is potentially extremely powerful, but few end users have figured out what is going on.  Python is a general purpose programming language that is deservedly popular, easy to learn, and quite powerful.  Substantial parts of Google are written in Python.  Check out the basics at www.python.org.

 

What does this have to do with SPSS?  Well, SPSS Syntax is fine and all, but it is a little old.  It doesn’t resemble modern languages in many ways, and has some arcane features.  Make no mistake, SPSS programming is all about Syntax, but sometimes our syntax needs a little help.  If your code is elaborate enough that you be doing lots of iteration, conditional statements, concatenation and the like, you should consider doing all the heavy lifting in Python.  Also, Python can tap into the “meta data” like measurement level that syntax can’t access.  The basics are at the “code center” found at http://forums.spss.com/code_center/

 

Why should you be enthusiastic about the possibilities?  Well, if all SPSS programming involves syntax, and syntax is just a file of letters and symbols, and Python is good at manipulating letters and symbols, it is going to be a good solution for complex problems.