How to set tempfile.tmpdir?

Andres Corrada-Emmanuel corrada at ciirsrv.cs.umass.edu
Thu Jul 18 14:37:37 EDT 2002


Duh! Thank you.

Andres Corrada-Emmanuel
Senior Research Fellow
Center for Intelligent Information Retrieval
University of Massachusetts, Amherst

On Thu, 18 Jul 2002, Dave Reed wrote:

> > From: Andres Corrada-Emmanuel <corrada at dandenong.cs.umass.edu>
> >
> > 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?
>
> You're missing an e
>
> tempfile.tempdir='/my/path'
>
> Dave
>
>






More information about the Python-list mailing list