[Python-bugs-list] [ python-Bugs-511261 ] WIN32 os.path.normpath('./') incorrect

noreply@sourceforge.net noreply@sourceforge.net
Thu, 07 Mar 2002 07:36:03 -0800


Bugs item #511261, was opened at 2002-01-31 16:22
You can respond by visiting: 
http://sourceforge.net/tracker/?func=detail&atid=105470&aid=511261&group_id=5470

Category: Python Library
Group: Python 2.1.1
Status: Open
Resolution: None
Priority: 5
Submitted By: Steven Knight (stevenknight)
Assigned to: Nobody/Anonymous (nobody)
Summary: WIN32 os.path.normpath('./') incorrect

Initial Comment:
os.path.normpath() on WIN32 systems returns a null 
string for . followed by a directory separator:

>>> os.path.normpath('./')
''
>>> os.path.normpath('.\')
''
>>> os.path.normpath('.')
'.'
>>>

Contrast with what happens on Linux:

>>> os.path.normpath('./')
'.'
>>> os.path.normpath('.')
'.'
>>>

Sorry, I don't have a later version than 2.1.1 
available to check whether this is fixed in a later 
version, but I did do a search for other reports of 
this bug and found none.

    --SK




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

Comment By: Gordon B. McMillan (gmcm)
Date: 2002-03-07 15:36

Message:
Logged In: YES 
user_id=4923

Python 2.2 (#28, Dec 21 2001, 12:21:22) [MSC 32 bit 
(Intel)] on win32
>>> os.path.normpath('./')
'.'
>>> os.path.normpath('.\')
'.'
>>> os.path.normpath('.')
'.'
>>>


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

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