Preference Options (Python)

Preference options are retrieved from the GetPreference method of the SpssClient class and set from the SetPreference method of that class. The option identifiers have the form SpssClient.PreferenceOptions.<option>, where the available option values are listed below--for example, SpssClient.PreferenceOptions.VariableListDisplay. All of the settings are strings.

Table 1. General Options
Option Valid Settings
VariableListDisplay "labels", "names"
VariableListSort "alphabetical", "file", "measurement"
MeasurementSystem "points", "inches", "centimeters"
Language "Russian", "French", "German", "English", "Italian", "Japanese", "Korean", "Polish", "SChinese", "Spanish", "TChinese",
AutoRaise "true", "false"
OutputScroll "true", "false"
OutputSound "system_beep", "none", "sound"
OutputSoundFile Path to a custom sound file
ScientificNotation "true", "false"
DigitGrouping Option associated with SET/SHOW DIGITGROUPING. Settings are "true" or "false".
OpenSyntaxAtStartup "true", "false"
OnlyOneDataset "true", "false"
OXMLVersion Option associated with SET/SHOW XVERSION. Settings are "default" or the Output XML schema version.
OutputAttributes Option associated with SET/SHOW OATTRS. Settings are "olang", "eng", or "both".
Table 2. Viewer Options
Option Valid Settings
TitleFont Font name, e.g. "Serif"
TitleFontSize Character representation of integer
TitleFontBold "true", "false"
TitleFontItalic "true", "false"
TitleFontUnderline "true", "false"
TitleFontColor Character representation of integer color
PageTitleFont Font name, e.g. "Serif"
PageTitleFontSize Character representation of integer
PageTitleFontBold "true", "false"
PageTitleFontItalic "true", "false"
PageTitleFontUnderline "true", "false"
PageTitleFontColor Character representation of integer color
TextOutputFont Font name, e.g. "Serif"
TextOutputFontSize Character representation of integer
TextOutputFontBold "true", "false"
TextOutputFontItalic "true", "false"
TextOutputFontUnderline "true", "false"
TextOutputFontColor Character representation of integer color
DisplayCommandsLog "Off", "On"
LogContents "hidden", "shown"
WarningsContents "hidden", "shown"
WarningsJustification "align_left", "align_center", "align_right"
NotesContents "hidden", "shown"
NotesJustification "align_left", "align_center", "align_right"
TitleContents "hidden", "shown"
TitleJustification "align_left", "align_center", "align_right"
PageTitleContents "hidden", "shown"
PageTitleJustification "align_left", "align_center", "align_right"
PivotTableContents "hidden", "shown"
PivotTableJustification "align_left", "align_center", "align_right"
ChartContents "hidden", "shown"
ChartJustification "align_left", "align_center", "align_right"
TextOutputContents "hidden", "shown"
TreeModelContents "hidden", "shown"
GenericJustification "align_left", "align_center", "align_right"
Orientation 1 (portrait), 2 (landscape)
LeftMargin Character representation of positive number in units of MeasurementSystem
RightMargin Character representation of positive number in units of MeasurementSystem
TopMargin Character representation of positive number in units of MeasurementSystem
BottomMargin Character representation of positive number in units of MeasurementSystem
Table 3. Data Options
Option Valid Settings
TransformationMergeOptions "calculate_before_used", "calculate_immediately"
RandomNumberGenerator "MC" (compatible with SPSS 12 and earlier), "MT" (Mersenne Twister)
DisplayFormatWidth Character representation of integer between 1 and 40.
DisplayFormatDecimal Character representation of integer between 0and 15.
ReadingExternalData Character representation of integer between 1 and 40.
CenturyRangeValue "Automatic", "custom"
CenturyRangeBeginYear Character representation of integer between 1582 and 9900.
Table 4. File Locations
Option Valid Settings
RecordSyntax "false", "true"
RecordMode "append", "overwrite"
SessionJournalFile Path to journal file
TempDir Path to temp directory
RecentFiles Recently used file list. Character representation of integer between 0 and 9.
DataFiles Path to startup folder for data files on Open and Save dialogs
OtherFiles Path to startup folder for other files on Open and Save dialogs
SpecifiedAndLastFolder "true" (last folder used), "false" (specified folder)
Table 5. Currency Options
Option Valid Settings
CustomOutputFormat "CCA", "CCB", "CCC", "CCD", "CCE"
AllValuesPrefix All values prefix
AllValuesSuffix All values suffix
NegativeValuesPrefix Negative values prefix
NegativeValuesSuffix Negative values suffix
DecimalSeparator "comma", "period"
Table 6. Output Options
Option Valid Settings
OutlineVariables "Names", "Labels", "Both"
OutlineVariableValues "Values", "Labels", "Both"
PivotTableVariables "Names", "Labels", "Both"
PivotTableVariableValues "Values", "Labels", "Both"
OutputDisplay "ModelViewer", "Tables"
Table 7. Chart Options
Option Valid Settings
ChartTemplate "On", "Off"
ChartTemplateFile Path to chart template file
ChartAspectRatio Chart aspect ratio
ChartFont Font name, e.g. "Arial"
ChartFrameInner "true", "false"
ChartFrameOuter "true", "false"
GridLineScale "true", "false"
GridLineCategory "true", "false"
StyleCyclePref "ColorsOnly", "PatternsOnly"
Table 8. Pivot Table Options
Option Valid Settings
ColumnWidth "Labels", "Both" (labels and data)
EditingMode "all_tables", "large_tables", "open_tables_window"
TableRender "full", "fast", "light" (alias for "fast")

Note: For the TableRender option, "light" is deprecated for release 20 and higher, and has the same effect as "fast".