<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 -- https://mail.python.org/mailman/listinfo/python-list