This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: ntpath normpath
Type: Stage:
Components: Library (Lib) Versions:
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: Nosy List: brett.cannon, keyphrene, paul.moore
Priority: normal Keywords:

Created on 2004-06-26 16:29 by keyphrene, last changed 2022-04-11 14:56 by admin. This issue is now closed.

Messages (3)
msg21323 - (view) Author: Keyphrene (keyphrene) Date: 2004-06-26 16:29
on windows

print os.path.normpath("c:\\blah\\\\blah.exe")
>>> c:\\blah\\blah.exe # correct syntax

print os.path.normpath("c:\\\\blah\\\\blah.exe")
>>> c:\\\\blah\\blah.exe # wrong syntax

this trouble gets an os error with the rename command
(OSError: [Errno 2] No such file or directory)

an solution:
path.replace("\\\\","\\")
msg21324 - (view) Author: Paul Moore (paul.moore) * (Python committer) Date: 2004-07-10 19:40
Logged In: YES 
user_id=113328

I've just submitted patch 988607 which fixes this issue.
msg21325 - (view) Author: Brett Cannon (brett.cannon) * (Python committer) Date: 2004-07-10 20:49
Logged In: YES 
user_id=357491

Paul's patch #988607 has been applied and fixed the bug.
History
Date User Action Args
2022-04-11 14:56:05adminsetgithub: 40464
2004-06-26 16:29:14keyphrenecreate