Message95256
The docs (http://www.python.org/doc/2.5.1/lib/module-tempfile.html) 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='.')
'./tmpHk1pBD'
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='.')
'./tmpoPXdL7'
>>> tempfile.mkstemp(dir='.')
(3, '/Users/roy2/tmpwTGZ2y')
>>> |
|
Date |
User |
Action |
Args |
2009-11-14 19:27:36 | roysmith | set | recipients:
+ roysmith |
2009-11-14 19:27:36 | roysmith | set | messageid: <1258226856.45.0.72736645389.issue7325@psf.upfronthosting.co.za> |
2009-11-14 19:27:34 | roysmith | link | issue7325 messages |
2009-11-14 19:27:34 | roysmith | create | |
|