This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author roysmith
Recipients roysmith
Date 2009-11-14.19:27:34
SpamBayes Score 7.52976e-07
Marked as misclassified No
Message-id <>
The docs ( specify that 
mkdtemp(), "returns the absolute pathname of the new directory".  It does that in 
the default case, but if you specify a relative path for 'dir', you get back a 
relative path.

$ python
Python 2.5.1 (r251:54863, Oct 17 2008, 14:39:09) 
[GCC 3.4.6 20060404 (Red Hat 3.4.6-10)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import tempfile
>>> tempfile.mkdtemp(dir='.')

similar results were obtained on:

Python 2.5.1 (r251:54863, Feb  6 2009, 19:02:12) 
[GCC 4.0.1 (Apple Inc. build 5465)] on darwin

Note that mkstemp() gets it right:

>>> tempfile.mkdtemp(dir='.')
>>> tempfile.mkstemp(dir='.')
(3, '/Users/roy2/tmpwTGZ2y')
Date User Action Args
2009-11-14 19:27:36roysmithsetrecipients: + roysmith
2009-11-14 19:27:36roysmithsetmessageid: <>
2009-11-14 19:27:34roysmithlinkissue7325 messages
2009-11-14 19:27:34roysmithcreate