LISTSERV at the University of Georgia
Menubar Imagemap
Home Browse Manage Request Manuals Register
Previous messageNext messagePrevious in topicNext in topicPrevious by same authorNext by same authorPrevious page (December 2009)Back to main SPSSX-L pageJoin or leave SPSSX-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Wed, 30 Dec 2009 10:05:00 -0700
Reply-To:     Jon K Peck <>
Sender:       "SPSSX(r) Discussion" <SPSSX-L@LISTSERV.UGA.EDU>
From:         Jon K Peck <>
Subject:      Re: temp files and python
Comments: To: "Pirritano, Matthew" <>
In-Reply-To:  <>
Content-Type: multipart/alternative;

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

variable named SPSSTMPDIR with the value being a directory. Then SPSS will create a temporary folder under that directory for each session regardless of where you run it from.

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., import os os.environ["SPSSTMPDIR"] = r"c:\someplace" import spss ...

HTH, Jon Peck SPSS, an IBM Company 312-651-3435

From: "Pirritano, Matthew" <> To: SPSSX-L@LISTSERV.UGA.EDU Date: 12/30/2009 08:46 AM Subject: [SPSSX-L] temp files and python Sent by: "SPSSX(r) Discussion" <SPSSX-L@LISTSERV.UGA.EDU>

Listees, 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 python? Any help, much appreciated! Thanks Matt Matthew Pirritano, Ph.D. Research Analyst IV Medical Services Initiative (MSI) Orange County Health Care Agency (714) 568-5648


Back to: Top of message | Previous page | Main SPSSX-L page