Clone wiki

savReaderWriter / Home


Note: You can find the savReaderWriter documentation on Pypi.


The :mod:`savReaderWriter` program uses the SPSS I/O module (.so, .dll, .dylib, depending on your Operating System). Users of the SPSS I/O module should read the International License Agreement before using the SPSS I/O module. By downloading, installing, copying, accessing, or otherwise using the SPSS I/O module, licensee agrees to the terms of this agreement. Copyright © IBM Corporation 1989, 2012 --- all rights reserved.

SavWriter -- Write Spss system files

Typical use:

savFileName = "someFile.sav"
records = [['Test1', 1, 1], ['Test2', 2, 1]]
varNames = ['var1', 'v2', 'v3']
varTypes = {'var1': 5, 'v2': 0, 'v3': 0}
with SavWriter(savFileName, varNames, varTypes) as writer:
    for record in records:

SavReader -- Read Spss system files

Typical use:

with SavReader(savFileName, returnHeader=True) as reader:
    header =
    for record in reader:

SavHeaderReader -- Read metadata in Spss system files

Typical use:

with SavHeaderReader(savFileName) as header:
    metadata = header.all()