How to test if two strings point to the same file or directory?

John Machin sjmachin at lexicon.net
Sat Dec 16 21:20:56 EST 2006


Tim Chase wrote:
[snip]
> I'd suggest os.path.samefile which should handle case-sensitive
> (non-win32) vs case-insensitive (win32) filenames, soft-links,
> and hard-links.  Not sure it's prescient enough to know if you
> have two remote shares, it will unwind them to their full
> server-path name.  Works here on my various boxes (Linux, MacOS-X
> and OpenBSD) here.  I'd assume it's the same functionality on Win32.
> 

Assume nothing. Read the manual.




More information about the Python-list mailing list