[Python-bugs-list] [ python-Bugs-728097 ] tmpnam problems on windows 2.3b, breaks test.test_os
SourceForge.net
noreply@sourceforge.net
Sat, 26 Apr 2003 09:39:42 -0700
Bugs item #728097, was opened at 2003-04-26 18:28
Message generated for change (Comment added) made by irmen
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=728097&group_id=5470
Category: Windows
Group: Python 2.3
Status: Open
Resolution: None
Priority: 5
Submitted By: Irmen de Jong (irmen)
Assigned to: Tim Peters (tim_one)
Summary: tmpnam problems on windows 2.3b, breaks test.test_os
Initial Comment:
(python 2.3b on Windows XP, regular user account)
Problem running test.test_os:
==============================================================
ERROR: test_tmpfile (__main__.TemporaryFileTests)
--------------------------------------------------------------
Traceback (most recent call last):
File "Lib\test\test_os.py", line 49, in test_tmpfile
fp = os.tmpfile()
OSError: [Errno 13] Permission denied
==============================================================
ERROR: test_tmpnam (__main__.TemporaryFileTests)
--------------------------------------------------------------
Traceback (most recent call last):
File "Lib\test\test_os.py", line 61, in test_tmpnam
self.check_tempfile(os.tmpnam())
File "Lib\test\test_os.py", line 29, in check_tempfile
open(name, "w")
IOError: [Errno 13] Permission denied: '\sd4.'
It appears Python 2.3b has troubles writing to a file
returned by os.tmpnam(), because when I try this on
Python 2.2:
>>> open(os.tmpnam(),"w")
<open file '\s128.8', mode 'w' at 0x0091BCC8>
Where Python 2.3b gives:
>>> open(os.tmpnam(),"w")
Traceback (most recent call last):
File "<stdin>", line 1, in ?
IOError: [Errno 13] Permission denied: '\sg4.1'
----------------------------------------------------------------------
>Comment By: Irmen de Jong (irmen)
Date: 2003-04-26 18:39
Message:
Logged In: YES
user_id=129426
Extra info:
Forget about Python 2.2, I tried again and it doesn't work
with 2.2 either. I found out why: My user account has no
write access in the root of C:\ !! I don't know about the
format of the filenames returned from os.tmpnam(), but it
appears that they are created in the root of the current
drive, which fails if that is C:\ -- where I have no write
access.
Needless to say, it works fine when running with
administrative priviliges because then we are allowed to
write in the root of C:\
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=728097&group_id=5470