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


Groups > comp.lang.python > #93141

Re: windows and file names > 256 bytes

X-FeedAbuse http://nntpfeed.proxad.net/abuse.pl feeded by 78.192.65.63
Path csiph.com!usenet.pasdenom.info!nntpfeed.proxad.net!news.muarf.org!news.roellig-ltd.de!open-news-network.org!border2.nntp.ams1.giganews.com!nntp.giganews.com!newsfeed.xs4all.nl!newsfeed8.news.xs4all.nl!post.news.xs4all.nl!not-for-mail
Return-Path <torriem+gmail@torriefamily.org>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.009
X-Spam-Evidence '*H*': 0.98; '*S*': 0.00; 'python,': 0.02; 'paths': 0.05; 'subject:file': 0.07; 'wrapper': 0.07; 'mentions': 0.09; 'python': 0.11; 'def': 0.14; 'from:addr:torriem': 0.16; 'from:name:michael torrie': 0.16; 'subject:windows': 0.16; 'wrote:': 0.16; 'basically': 0.18; 'windows': 0.20; 'am,': 0.23; 'absolute': 0.23; 'errors': 0.23; 'header:In-Reply-To:1': 0.24; 'tim': 0.24; 'header:User-Agent:1': 0.26; 'possibility': 0.27; 'function:': 0.29; 'work.': 0.30; 'certainly': 0.31; 'file': 0.34; 'message-id:@gmail.com': 0.35; 'could': 0.35; 'to:addr:python- list': 0.35; 'path': 0.35; 'problem.': 0.35; 'but': 0.36; 'there': 0.36; 'possible': 0.36; 'subject:: ': 0.37; 'received:org': 0.38; 'names': 0.38; 'to:addr:python.org': 0.39; 'received:192': 0.39; 'where': 0.40; 'him': 0.60; 'your': 0.60; 'even': 0.61; 'more': 0.62; 'charset:windows-1252': 0.65; 'sounds': 0.72; '2.7.': 0.84; 'pain': 0.84
X-Virus-Scanned amavisd-new at torriefamily.org
Date Thu, 25 Jun 2015 07:35:06 -0600
From Michael Torrie <torriem@gmail.com>
User-Agent Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.7.0
MIME-Version 1.0
To python-list@python.org
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>
In-Reply-To <558BF55C.2010701@timgolden.me.uk>
Content-Type text/plain; charset=windows-1252
Content-Transfer-Encoding 7bit
X-BeenThere python-list@python.org
X-Mailman-Version 2.1.20+
Precedence list
List-Id General discussion list for the Python programming language <python-list.python.org>
List-Unsubscribe <https://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe>
List-Archive <http://mail.python.org/pipermail/python-list/>
List-Post <mailto:python-list@python.org>
List-Help <mailto:python-list-request@python.org?subject=help>
List-Subscribe <https://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe>
Newsgroups comp.lang.python
Message-ID <mailman.66.1435239311.3674.python-list@python.org> (permalink)
Lines 16
NNTP-Posting-Host 2001:888:2000:d::a6
X-Trace 1435239311 news.xs4all.nl 2826 [2001:888:2000:d::a6]:46350
X-Complaints-To abuse@xs4all.nl
Xref csiph.com comp.lang.python:93141

Show key headers only | 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