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

John Nagle nagle at animats.com
Sun Dec 17 01:54:19 EST 2006


Sandra-24 wrote:
> Comparing file system paths as strings is very brittle. Is there a
> better way to test if two paths point to the same file or directory
> (and that will work across platforms?)

     No.

     There are ways to do it for many operating systems, but there is no
system-independent way.  It's often not possible for files accessed
across a network; the information just isn't being sent.

				John Nagle



More information about the Python-list mailing list