How to set tempfile.tmpdir?
Andres Corrada-Emmanuel
corrada at ciirsrv.cs.umass.edu
Thu Jul 18 11:44:01 EDT 2002
Hi,
I'm trying to use tempfile to generate a temporary filename in the
directory of my chossing. I thought that this would work:
import tempfile
tempfile.tmpdir = '/my/path'
temp_name = tempfile.mktemp()
However, it doesn't. I'm working on SunOS and temp_name always comes back
with /tmp/some_unique_identifier.
What am I doing wrong?
Andres Corrada-Emmanuel
Senior Research Fellow
Center for Intelligent Information Retrieval
University of Massachusetts, Amherst
More information about the Python-list
mailing list