[Greg Ewing] > ... > A trailing slash on a Unix pathname doesn't tell you anything > about whether it refers to a directory. It does if it's also the only character in the pathname <0.5 wink>. The same thing bites people on Windows, except even worse, because in UNC pathnames the leading \\machine\volume "acts like a root", and the presence or absence of a trailing backslash there makes a world of difference too. > ... > The only sure way to find out whether a given pathname refers > to a directory or not is to ask the filesystem. On Windows again, >>> from os import path >>> path.exists("/python16") 1 >>> path.exists("/python16/") 0 >>> This insane behavior is displayed by the MS native APIs too, but isn't documented (at least not last time I peed away hours looking for it). just-more-evidence-that-windows-weenies-shouldn't-get-a-vote!-ly y'rs - tim
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4