Date: Wed, 30 Dec 2009 10:05:00 -0700
Reply-To: Jon K Peck <firstname.lastname@example.org>
Sender: "SPSSX(r) Discussion" <SPSSX-L@LISTSERV.UGA.EDU>
From: Jon K Peck <email@example.com>
Subject: Re: temp files and python
I presume that you are referring to Python in external mode. External
mode generally does not use your preference settings such as for the
temporary directory. In order to set that location, create an environment
with the value being a directory. Then SPSS will create a temporary
folder under that directory for each session regardless of where you run
Normally you would do this from the Control Panel
(System/Advanced/Environment Variables), but you could alternatively
create this variable in your Python code before starting SPSS. E.g.,
os.environ["SPSSTMPDIR"] = r"c:\someplace"
SPSS, an IBM Company
"Pirritano, Matthew" <MPirritano@ochca.com>
12/30/2009 08:46 AM
[SPSSX-L] temp files and python
"SPSSX(r) Discussion" <SPSSX-L@LISTSERV.UGA.EDU>
In SPSS I?ve chosen to route my temporary files to an spss_temp folder.
But when I run spss processes using spss.Submit in python the temp files
are routed to my personal temp folder under ?Documents and Settings?. How
do I change this? I?m winding up with dozens of spss temp folders that
wind up clogging things up. Do I need to use a command like tempdir in
Any help, much appreciated!
Matthew Pirritano, Ph.D.
Research Analyst IV
Medical Services Initiative (MSI)
Orange County Health Care Agency