[Python-Dev] os.normpath may change the meaning of the path if itcontains symbolic links?
fredrik at pythonware.com
Fri Dec 2 23:34:34 CET 2005
Nir Soffer wrote:
> However, I found this alarming note in the docs:
> "It should be understood that this may change the meaning of the path
> if it contains symbolic links!"
> The function docstring does not contain this note:
> """Normalize path, eliminating double slashes, etc."""
> And finally, there is no test for this symbolic link problem.
> Anyone has a clue about this?
if BAR is a symbolic link, FOO/BAR/../DIR isn't necessarily the same
thing as FOO/DIR.
a simple example:
$ ln -s /etc etc
$ ls -ld etc
lrwxrwxrwx 1 fredrik fredrik 4 Dec 2 23:22 etc -> /etc
Python 2.4.1 (#1, Sep 12 2005, 19:35:02)
>>> import os
-bash: usr/local/bin/python2.4: No such file or directory
More information about the Python-Dev