Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #93141

Re: windows and file names > 256 bytes

Date 2015-06-25 07:35 -0600
From Michael Torrie <torriem@gmail.com>
Subject Re: windows and file names > 256 bytes
References <mmgce2$cd4$1@ger.gmane.org> <mmgnbt$u0o$1@ger.gmane.org> <CAB1GNpS=7F3ebrHenUu7+MvyWuk5v60G6N6L81c0W3C-mQPi2w@mail.gmail.com> <558BF55C.2010701@timgolden.me.uk>
Newsgroups comp.lang.python
Message-ID <mailman.66.1435239311.3674.python-list@python.org> (permalink)

Show all headers | View raw


On 06/25/2015 06:34 AM, Tim Golden wrote:
> On 25/06/2015 13:04, Joonas Liik wrote:
>> It sounds to me more like it is possible to use long file names on windows
>> but it is a pain and in python, on windows it is basically impossible.
> 
> Certainly not impossible: you could write your own wrapper function:
> 
> def extended_path(p):
>     return r"\\?\%s" % os.path.abspath(p)
> 
> where you knew that there was a possibility of long paths and that an
> absolute path would work.

The OP mentions that even when he manually supplies extended paths,
os.mkdir, os.getsize, and shutil.rmtree return errors for him in Python
2.7.  So there's more to this problem.

Back to comp.lang.python | Previous | Next | Find similar | Unroll thread


Thread

Re: windows and file names > 256 bytes Michael Torrie <torriem@gmail.com> - 2015-06-25 07:35 -0600

csiph-web