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


Groups > comp.lang.python > #93136

Re: windows and file names > 256 bytes

Path csiph.com!optima2.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!1.eu.feeder.erje.net!newsfeed.xs4all.nl!newsfeed8.news.xs4all.nl!post.news.xs4all.nl!not-for-mail
Return-Path <mail@timgolden.me.uk>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.005
X-Spam-Evidence '*H*': 0.99; '*S*': 0.00; 'python,': 0.02; 'paths': 0.05; 'subject:file': 0.07; 'wrapper': 0.07; 'def': 0.14; 'from:addr:timgolden.me.uk': 0.16; 'from:name:tim golden': 0.16; 'message-id:@timgolden.me.uk': 0.16; 'received:74.55.86': 0.16; 'received:74.55.86.74': 0.16; 'received:smtp.webfaction.com': 0.16; 'received:webfaction.com': 0.16; 'subject:windows': 0.16; 'tjg': 0.16; 'wrote:': 0.16; 'basically': 0.18; 'windows': 0.20; 'absolute': 0.23; 'header:In-Reply-To:1': 0.24; 'header:User- Agent:1': 0.26; 'possibility': 0.27; 'function:': 0.29; 'work.': 0.30; 'certainly': 0.31; 'received:192.168.100': 0.33; 'file': 0.34; 'could': 0.35; 'to:addr:python-list': 0.35; 'path': 0.35; 'but': 0.36; 'there': 0.36; 'possible': 0.36; 'subject:: ': 0.37; 'names': 0.38; 'to:addr:python.org': 0.39; 'received:192': 0.39; 'where': 0.40; 'your': 0.60; 'more': 0.62; 'charset:windows-1252': 0.65; 'from:addr:mail': 0.70; 'sounds': 0.72; 'pain': 0.84; 'to:name:python': 0.84
Subject Re: windows and file names > 256 bytes
To Python <python-list@python.org>
References <mmgce2$cd4$1@ger.gmane.org> <mmgnbt$u0o$1@ger.gmane.org> <CAB1GNpS=7F3ebrHenUu7+MvyWuk5v60G6N6L81c0W3C-mQPi2w@mail.gmail.com>
From Tim Golden <mail@timgolden.me.uk>
Date Thu, 25 Jun 2015 13:34:36 +0100
User-Agent Mozilla/5.0 (Windows NT 6.1; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.0.1
MIME-Version 1.0
In-Reply-To <CAB1GNpS=7F3ebrHenUu7+MvyWuk5v60G6N6L81c0W3C-mQPi2w@mail.gmail.com>
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.61.1435235680.3674.python-list@python.org> (permalink)
Lines 13
NNTP-Posting-Host 2001:888:2000:d::a6
X-Trace 1435235680 news.xs4all.nl 2932 [2001:888:2000:d::a6]:58632
X-Complaints-To abuse@xs4all.nl
Xref csiph.com comp.lang.python:93136

Show key headers only | View raw


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.

TJG

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


Thread

Re: windows and file names > 256 bytes Tim Golden <mail@timgolden.me.uk> - 2015-06-25 13:34 +0100

csiph-web