"Feature" in ntpath.py in Python 2.0?
tim at worthy.demon.co.uk
Sat May 5 03:12:56 EDT 2001
In message <3AF3A1F2.1CD58F7F at bldigital.com>
Ben Allfree <cm at bldigital.com> wrote:
> Does anybody know if join() in ntpath.py was changed from appending the
> os.sep value to appending a hard-coded "\\"? Unless I changed my distro
> in previous releases and forgot, I thought os.sep could be changed so
> that join() would behave differently.
Yes it changed, I was doing work on a non-NT OS which had to play with
NT filenames in a file.
Trying to use os.path was obviously incorrect so I changed os.sep, that
failed - ah, I imported ntpath and used that directly.
It actually seemed the correct way to do it.
My guess is..
NTpath if for manipulating NT paths - which should always therefore obey
NT's conventions, os.path is for manipulating live path names on
whatever OS it is running.
|im ---- ARM Powered ----
More information about the Python-list