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


Groups > comp.lang.python > #93203

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!newsfeed7.news.xs4all.nl!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail
Return-Path <python-python-list@m.gmane.org>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.002
X-Spam-Evidence '*H*': 1.00; '*S*': 0.00; 'sys': 0.05; 'shutil': 0.07; 'subject:file': 0.07; 'received:80.91': 0.09; 'received:80.91.229': 0.09; 'received:gmane.org': 0.09; 'received:list': 0.09; 'skip:# 20': 0.13; '"assert"': 0.16; 'received:80.91.229.3': 0.16; 'received:plane.gmane.org': 0.16; 'subject:windows': 0.16; 'tmpdir': 0.16; 'tree': 0.18; 'software.': 0.22; 'sorry,': 0.22; 'import': 0.24; 'header:User- Agent:1': 0.26; 'header:X-Complaints-To:1': 0.26; 'skip:u 20': 0.30; '---': 0.30; 'checked': 0.31; 'file': 0.34; 'to:addr:python- list': 0.35; 'skip:o 20': 0.35; 'should': 0.37; 'subject:: ': 0.37; 'received:org': 0.38; 'to:addr:python.org': 0.39; 'course': 0.64; 'antivirus': 0.66; 'received:nl': 0.72; 'avast': 0.84
X-Injected-Via-Gmane http://gmane.org/
To python-list@python.org
From Albert-Jan Roskam <sjeik_appie@hotmail.com>
Subject Re: windows and file names > 256 bytes
Date Fri, 26 Jun 2015 17:58:57 +0000 (UTC)
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> <558C038A.5010103@gmail.com> <558C0433.2050601@timgolden.me.uk> <mmk3a6$hrb$1@ger.gmane.org>
Mime-Version 1.0
Content-Type text/plain; charset=UTF-8
Content-Transfer-Encoding 8bit
X-Gmane-NNTP-Posting-Host 82-170-182-209.ip.telfort.nl
User-Agent Pan/0.139 (Sexual Chocolate; GIT bf56508 git://git.gnome.org/pan2)
X-Antivirus avast! (VPS 150624-2, 06/24/2015), Outbound message
X-Antivirus-Status Clean
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.110.1435341547.3674.python-list@python.org> (permalink)
Lines 21
NNTP-Posting-Host 2001:888:2000:d::a6
X-Trace 1435341547 news.xs4all.nl 2900 [2001:888:2000:d::a6]:48621
X-Complaints-To abuse@xs4all.nl
Xref csiph.com comp.lang.python:93203

Show key headers only | View raw


<snip> 

> import os import shutil import sys
>  
> # create an insanely long directory tree p = os.getenv("TEMP")
> #p = ur"\\server\share\blah\temp"
> tmpdir = p os.chdir(tmpdir)
> for i in xrange(1000):
>     tmpdir = os.path.join(tmpdir, "sub") os.mkdir("\\\\?\\" + tmpdir)
>     #os.mkdir(u"\\\\?\\UNC" + tmpdir[1:])
>  
> # write a file to it deep = "\\\\?\\" + os.path.join(tmpdir, "deep.txt")
> assert os.path.exists(deep)

sorry, this "assert" should of course follow 'with open(..' 

---
This email has been checked for viruses by Avast antivirus software.
https://www.avast.com/antivirus

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


Thread

Re: windows and file names > 256 bytes Albert-Jan Roskam <sjeik_appie@hotmail.com> - 2015-06-26 17:58 +0000

csiph-web