Eryk Sun <[email protected]> added the comment:
Python 2.7 is all but set in stone. Changes to its behavior have to correct
serious bugs, not work around limits in an OS. You can do that yourself. For
example, use an extended local-device path, i.e. a path that's prefixed by
u"\\\\?\\". This path type must be unicode, fully-qualified, and use only
backslash as the path separator. Also, the UNC device has to be used
explicitly. Python 2 has poor support for unicode raw strings (\u and \U
escapes aren't disabled), so you can instead use forward slashes and
normpath(). For example:
f1_path =
os.path.normpath(u"//?/UNC/tst/tc/proj/MTV/cs_fft/Milo/Fries/STL/BLNA/F1")
log_path = os.path.join(f1_path, log_filename)
assert os.path.isfile(log_path)
----------
nosy: +eryksun
title: os.isfile returns false on Windows when file path is longer than 260
characters -> os.path.isfile returns false on Windows when file path is longer
than 260 characters
_______________________________________
Python tracker <[email protected]>
<https://bugs.python.org/issue33105>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com