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: 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 References: From: Tim Golden 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: 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 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.python Message-ID: 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 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