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

SourceForge.net noreply@sourceforge.net
Wed, 04 Jun 2003 10:42:52 -0700


Bugs item #511261, was opened at 2002-01-31 08:22
Message generated for change (Comment added) made by mshomphe
You can respond by visiting: 
https://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: Matthew Shomphe (mshomphe)
Date: 2003-06-04 10:42

Message:
Logged In: YES 
user_id=716326

This appears to be fixed in 2.3b1:

Python 2.3b1 (#40, Apr 25 2003, 19:06:24) [MSC v.1200 32 
bit (Intel)] on win32
Type "copyright", "credits" or "license" for more information.
IDLE 0.8 -- press F1 for help
>>> import os
>>> os.path.normpath('./')
'.'
>>> os.path.normpath('.\')
'.'
>>> os.path.normpath('.')
'.'

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

Comment By: Gordon B. McMillan (gmcm)
Date: 2002-03-07 07: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: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=511261&group_id=5470