Re: pathlib.Path.is_file vs os.path.isfile difference
> On 10 Mar 2024, at 14:49, Thomas Passin via Python-list > wrote: > > That and there's a registry setting: > > https://learn.microsoft.com/en-us/windows/win32/fileio/maximum-file-path-limitation > Yep that and rules about size of parts of the path. Barry -- https://mail.python.org/mailman/listinfo/python-list
Re: pathlib.Path.is_file vs os.path.isfile difference
On 3/10/2024 9:33 AM, Albert-Jan Roskam wrote: On Mar 10, 2024 12:59, Thomas Passin via Python-list wrote: On 3/10/2024 6:17 AM, Barry wrote: > > >> On 8 Mar 2024, at 23:19, Thomas Passin via Python-list wrote: >> >> We just learned a few posts back that it might be specific to Linux; I ran it on Windows. > > Depending on the exact win32 api used there is a 257 limit on windows. > The 257 includes 2 for the device, C:, and 255 for the path part that will use 1 for the leading \. Getting an error for a name that is 255 is not surprising. > > Other api allow for 65535 limit, not sure on its additional limits. I seem to remember there is a setting to allow longer paths, but I forget any details. = You mean the "\\?\" prefix? https://learn.microsoft.com/en-us/windows/win32/fileio/maximum-file-path-limitation?tabs=registry That and there's a registry setting: https://learn.microsoft.com/en-us/windows/win32/fileio/maximum-file-path-limitation -- https://mail.python.org/mailman/listinfo/python-list
Re: pathlib.Path.is_file vs os.path.isfile difference
On Mar 10, 2024 12:59, Thomas Passin via Python-list wrote: On 3/10/2024 6:17 AM, Barry wrote: > > >> On 8 Mar 2024, at 23:19, Thomas Passin via Python-list wrote: >> >> We just learned a few posts back that it might be specific to Linux; I ran it on Windows. > > Depending on the exact win32 api used there is a 257 limit on windows. > The 257 includes 2 for the device, C:, and 255 for the path part that will use 1 for the leading \. Getting an error for a name that is 255 is not surprising. > > Other api allow for 65535 limit, not sure on its additional limits. I seem to remember there is a setting to allow longer paths, but I forget any details. = You mean the "\\?\" prefix? https://learn.microsoft.com/en-us/windows/win32/fileio/maximum-file-path-limitation?tabs=registry -- https://mail.python.org/mailman/listinfo/python-list
Re: pathlib.Path.is_file vs os.path.isfile difference
On 3/10/2024 6:17 AM, Barry wrote: On 8 Mar 2024, at 23:19, Thomas Passin via Python-list wrote: We just learned a few posts back that it might be specific to Linux; I ran it on Windows. Depending on the exact win32 api used there is a 257 limit on windows. The 257 includes 2 for the device, C:, and 255 for the path part that will use 1 for the leading \. Getting an error for a name that is 255 is not surprising. Other api allow for 65535 limit, not sure on its additional limits. I seem to remember there is a setting to allow longer paths, but I forget any details. -- https://mail.python.org/mailman/listinfo/python-list
Re: pathlib.Path.is_file vs os.path.isfile difference
> On 8 Mar 2024, at 23:19, Thomas Passin via Python-list > wrote: > > We just learned a few posts back that it might be specific to Linux; I ran it > on Windows. Depending on the exact win32 api used there is a 257 limit on windows. The 257 includes 2 for the device, C:, and 255 for the path part that will use 1 for the leading \. Getting an error for a name that is 255 is not surprising. Other api allow for 65535 limit, not sure on its additional limits. Barry -- https://mail.python.org/mailman/listinfo/python-list