[Python-bugs-list] [ python-Bugs-810408 ] mkstemp doesn't return abspath

SourceForge.net noreply at sourceforge.net
Tue Sep 23 07:03:06 EDT 2003


Bugs item #810408, was opened at 2003-09-22 15:26
Message generated for change (Comment added) made by anthonybaxter
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=810408&group_id=5470

Category: Python Library
Group: Python 2.3
Status: Open
Resolution: None
Priority: 5
Submitted By: George Yoshida (quiver)
Assigned to: Nobody/Anonymous (nobody)
Summary: mkstemp doesn't return abspath

Initial Comment:
The document of tempfile.mkstemp says that,

"mkstemp() returns a tuple containing an OS-level 

handle to an open file (as would be returned by 

os.open()) and the absolute pathname of that file, 

in that order."



However, if you specify the directory a relative path,

it doesn't return an absolute pathname.



>>> import tempfile

>>> tempfile.mkstemp()

(5, '/tmp/tmpHBq8rz')

>>> tempfile.mkstemp(dir='.')

(3, './tmpvK7BEr')

>>> tempfile.mkstemp(dir='./test')

(4, './test/tmplB7GZF')



----------------------------------------------------------------------

>Comment By: Anthony Baxter (anthonybaxter)
Date: 2003-09-23 21:03

Message:
Logged In: YES 
user_id=29957

Anyone got an opinion on this one? Should the docs be fixed,

or the code?

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=810408&group_id=5470



More information about the Python-bugs-list mailing list