Path: csiph.com!fu-berlin.de!uni-berlin.de!not-for-mail From: Random832 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: 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: 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 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-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 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