windows and file names > 256 bytes

Chris Angelico rosuav at gmail.com
Thu Jun 25 05:23:16 EDT 2015


On Thu, Jun 25, 2015 at 7:16 PM, Steven D'Aprano
<steve+comp.lang.python at pearwood.info> wrote:
>> 2. Is this a bug in Python? I would prefer if Python dealt with the gory
>> details of Windows' silly behavior.
>
> I would say that it is a bug that it doesn't work with extended-length paths
> (those starting with \\?\) but may or may not be a bug with regular paths.

I'd go further and say that the OP is right in expecting Python to
deal with the gory details. Would it break anything for Python to
prepend \\?\ to all file names before giving them to certain APIs?
Then the current behaviour of stripping off that prefix would be fine.

Are there any times when you *don't* want Windows to use the
extended-length path?

ChrisA



More information about the Python-list mailing list