How to set tempfile.tmpdir?
Dave Reed
dreed at capital.edu
Thu Jul 18 13:52:21 EDT 2002
> 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