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


Groups > comp.lang.python > #107497

Re: Remove directory tree without following symlinks

Path csiph.com!fu-berlin.de!uni-berlin.de!not-for-mail
From Random832 <random832@fastmail.com>
Newsgroups comp.lang.python
Subject Re: Remove directory tree without following symlinks
Date Fri, 22 Apr 2016 11:09:26 -0400
Lines 6
Message-ID <mailman.16.1461337768.2861.python-list@python.org> (permalink)
References <571a3ba2$0$1597$c3e8da3$5496439d@news.astraweb.com> <1461337766.365000.586700849.0DDBDB0B@webmail.messagingengine.com>
Mime-Version 1.0
Content-Type text/plain
Content-Transfer-Encoding 7bit
X-Trace news.uni-berlin.de IfUYqo1XJ0u23NLs4e2DlwXw62GmvtiImodU27J+0x/w==
Return-Path <random832@fastmail.com>
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; '22,': 0.09; 'mentions': 0.09; 'received:internal': 0.09; 'message- id:@webmail.messagingengine.com': 0.16; 'os.walk': 0.16; 'received:10.202': 0.16; 'received:10.202.2': 0.16; 'received:66.111': 0.16; 'received:66.111.4': 0.16; 'received:io': 0.16; 'received:messagingengine.com': 0.16; 'received:psf.io': 0.16; 'recipe': 0.16; 'subject:Remove': 0.16; 'wrote:': 0.16; 'header:In-Reply-To:1': 0.24; 'fri,': 0.27; "d'aprano": 0.33; 'steven': 0.33; 'should': 0.36; 'to:addr:python-list': 0.36; 'subject:: ': 0.37; 'received:10': 0.37; 'received:66': 0.38; 'does': 0.39; 'to:addr:python.org': 0.40; 'header:Message-Id:1': 0.61; 'subject:tree': 0.84
DKIM-Signature v=1; a=rsa-sha1; c=relaxed/relaxed; d=fastmail.com; h= content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-sasl-enc :x-sasl-enc; s=mesmtp; bh=1g1l+PQLt4jiQK07Oh8Hjyn7Vog=; b=3rOsoD BRK0yqSP+OkH5HtU7KEwjoMSjIw2Owrw1F33/QhaJR55GQ0zs+AYrHC2533RmfNY AOw4yDOxyhF6s7rn7rCG5Zu0h/G5ucUCjfoVZVQEh9BO9sTq2ScHtFelBaP3zIs2 DaJHQWcxqqn70rEGufmULGoeDmXReh8+owqV4=
DKIM-Signature v=1; a=rsa-sha1; c=relaxed/relaxed; d= messagingengine.com; h=content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-sasl-enc:x-sasl-enc; s=smtpout; bh=1g1l+PQLt4jiQK0 7Oh8Hjyn7Vog=; b=bEGOdSCTBvEU2fWeb38a3Pa/f7ol6Q2KHbgY3cI9LDreXWf eHYpwToQN3t9tZWHLjQte3Pfsi9WrdLAxTqnsbnAw/c28gUj4CPzFaDfJjiVU/YF UXuS+DF9UNYmCk1I0PB9e5NhmYHjg8ZM0AIQPjJElfshewhUG33hZPULjrfA=
X-Sasl-Enc 2h1tk54S6+6QGYpF0443RR6UdrWilNpeJan8lPiuChgv 1461337766
X-Mailer MessagingEngine.com Webmail Interface - ajax-76f1c811
In-Reply-To <571a3ba2$0$1597$c3e8da3$5496439d@news.astraweb.com>
X-BeenThere python-list@python.org
X-Mailman-Version 2.1.22
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>
X-Mailman-Original-Message-ID <1461337766.365000.586700849.0DDBDB0B@webmail.messagingengine.com>
X-Mailman-Original-References <571a3ba2$0$1597$c3e8da3$5496439d@news.astraweb.com>
Xref csiph.com comp.lang.python:107497

Show key headers only | View raw


On Fri, Apr 22, 2016, at 10:56, Steven D'Aprano wrote:
> What should I use for "remove_tree"? Do I have to write my own, or does a
> solution already exist?

In the os.walk documentation it provides a simple recipe and also
mentions shutil.rmtree

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


Thread

Remove directory tree without following symlinks Steven D'Aprano <steve@pearwood.info> - 2016-04-23 00:56 +1000
  Re: Remove directory tree without following symlinks Random832 <random832@fastmail.com> - 2016-04-22 11:09 -0400
    Re: Remove directory tree without following symlinks Steven D'Aprano <steve@pearwood.info> - 2016-04-23 03:14 +1000
      RE: Remove directory tree without following symlinks Albert-Jan Roskam <sjeik_appie@hotmail.com> - 2016-04-22 17:39 +0000
      Re: Remove directory tree without following symlinks eryk sun <eryksun@gmail.com> - 2016-04-22 13:28 -0500
      RE: Remove directory tree without following symlinks Albert-Jan Roskam <sjeik_appie@hotmail.com> - 2016-04-23 09:34 +0000
      Re: Remove directory tree without following symlinks eryk sun <eryksun@gmail.com> - 2016-04-23 15:22 -0500
      Re: Remove directory tree without following symlinks eryk sun <eryksun@gmail.com> - 2016-04-24 14:42 -0500
  Re: Remove directory tree without following symlinks Paul Rubin <no.email@nospam.invalid> - 2016-04-23 01:13 -0700
    Re: Remove directory tree without following symlinks Steven D'Aprano <steve@pearwood.info> - 2016-04-23 20:24 +1000
      Re: Remove directory tree without following symlinks Gregory Ewing <greg.ewing@canterbury.ac.nz> - 2016-04-23 23:37 +1200
      Re: Remove directory tree without following symlinks Random832 <random832@fastmail.com> - 2016-04-23 17:04 -0400
  Re: Remove directory tree without following symlinks Nobody <nobody@nowhere.invalid> - 2016-04-23 17:29 +0100
    Re: Remove directory tree without following symlinks Random832 <random832@fastmail.com> - 2016-04-23 17:07 -0400

csiph-web