bug in os.path.samefile (Python 1.5.1)?

Michael P. Reilly arcege at shore.net
Mon Jun 7 11:52:45 EDT 1999


Robin Becker <robin at jessikat.demon.co.uk> wrote:
: In article <Pine.LNX.4.10.9906070536020.2300-100000 at tbryanpc.arlut.utexa
: s.edu>, Thomas Bryan <tbryan at tbryanpc.arlut.utexas.edu> writes
:>
:>On Mon, 7 Jun 1999, Matej Cepl wrote:
:>
:>
: ...
:>
:>Aren't filenames case-sensitive on NT?  Look at your traceback.  Notice
: last time I used NT4.0 in November paths were case insensitive

I think case-insensitive is correct; and there is os.path.normcase()
for this I believe.

I've just tried Python 1.5.2 (don't have 1.5.1 installed anymore, sorry)
on WinNt 4.0 SP3 and get case-insensitivity:

Python 1.5.2 (#0, Apr 13 1999, 10:51:12) [MSC 32 bit <Intel>] on win32
Copyright 1991-19995 Stichting Mathematisch Centrum, Amsterdam
>>> import os, win32api
>>> os.getcwd()
'D:\\Program Files\\Python'
>>> os.listdir('d:\\python files\\python')
['DLLs', 'Doc', 'include', INSTALL.LOG', 'Lib', 'libs', 'py.ico', 'pyc.ico',
'pycon.ico', 'python.exe', 'pythonw.exe', 'Tools', 'UNWISE.EXE']
>>> os.stat('doc')
(16895, 0, 3, 1, 0, 0, 0, 957573914, 918516880, 918516864)
>>> win32api.GetVersionEx()
(4, 0, 1381, 2, 'Service Pack 3')
>>> os.path.normcase('D:\\Program files\\Python')
'd:\\program files\\python'
>>>

Not really answering the original posting I know, but... :)

  -Arcege





More information about the Python-list mailing list