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


Groups > comp.lang.python > #5546

Re: Deleting a file?

Path csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!gegeweb.org!de-l.enfer-du-nord.net!feeder2.enfer-du-nord.net!feeder.news-service.com!newsfeed.xs4all.nl!newsfeed6.news.xs4all.nl!xs4all!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail
Return-Path <malaclypse2@gmail.com>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.011
X-Spam-Evidence '*H*': 0.98; '*S*': 0.00; 'received:mail- bw0-f46.google.com': 0.09; 'pm,': 0.11; 'wrote:': 0.14; 'library': 0.15; 'received:209.85.214.46': 0.16; 'recycle': 0.16; 'subject:Deleting': 0.16; 'url:hardcoded': 0.16; 'url:hg': 0.16; 'windows?': 0.16; '16,': 0.16; 'subject:file': 0.16; 'code': 0.22; 'header:In-Reply-To:1': 0.22; 'mon,': 0.22; 'message- id:@mail.gmail.com': 0.28; 'looks': 0.28; 'closing': 0.29; 'subject:?': 0.29; 'mode': 0.29; 'url:articles': 0.31; 'does': 0.31; 'it.': 0.31; 'to:addr:python-list': 0.32; 'source': 0.32; 'module': 0.33; 'file': 0.35; 'think': 0.36; 'received:209.85': 0.37; 'received:google.com': 0.38; 'but': 0.38; 'pretty': 0.38; 'anything': 0.38; 'received:209.85.214': 0.39; 'to:addr:python.org': 0.39; 'received:209': 0.39; 'how': 0.39; 'header:Received:5': 0.40; '2011': 0.62; 'url:net': 0.62
DKIM-Signature v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:in-reply-to:references:date :message-id:subject:from:to:content-type; bh=nGrf2kVK6V1HGvOcpdkNgpeeQIEv1HCY0HuDk+Es32M=; b=fSyD5aKzUuy80fjqYiXGs3UdIt+oJl/dv1aphxD54jyOFPUzrvGrFVx8E27QHlSUGE 0mOSDKqBvjf6cZ6gOd+6ZC4/JkuwpW2XQCUQuJtfdqHKqsl1n6+rZi0t0K+tEI5LjRNt G2We1ga5b44fLNvQckIjjeoxa288CZckoQa5w=
DomainKey-Signature a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; b=OKGe7xownAnx6Kpq2TklmEAi7DZlbMAR1jOOFjBJzggGlvua7Ir7v+WSDGHXr7zx+m 1EhcijS3T1SuY2/DM3rV7Ci1LO6rSMHTZesKKmPBLRbUhE07x8Bw2ynIUzKxsu/2GnKS zmOBOeqCOZnNsombyxVTja2F2R2azr/hkv6rg=
MIME-Version 1.0
In-Reply-To <iqsdtn$va2$1@speranza.aioe.org>
References <iqsdtn$va2$1@speranza.aioe.org>
Date Mon, 16 May 2011 23:06:44 -0400
Subject Re: Deleting a file?
From Jerry Hill <malaclypse2@gmail.com>
To python-list@python.org
Content-Type text/plain; charset=UTF-8
X-BeenThere python-list@python.org
X-Mailman-Version 2.1.12
Precedence list
List-Id General discussion list for the Python programming language <python-list.python.org>
List-Unsubscribe <http://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 <http://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe>
Newsgroups comp.lang.python
Message-ID <mailman.1654.1305601607.9059.python-list@python.org> (permalink)
Lines 12
NNTP-Posting-Host 82.94.164.166
X-Trace 1305601607 news.xs4all.nl 49044 [::ffff:82.94.164.166]:36161
X-Complaints-To abuse@xs4all.nl
Xref x330-a1.tempe.blueboxinc.net comp.lang.python:5546

Show key headers only | View raw


On Mon, May 16, 2011 at 5:23 PM, garyr <garyr@fidalgo.net> wrote:
> A file can be deleted by opening it with mode os.O_TEMPORARY and then
> closing it. How can a file be moved to the Recycle Bin, a la Windows?

I see a send2trash module (http://hg.hardcoded.net/send2trash and
http://www.hardcoded.net/articles/send-files-to-trash-on-all-platforms.htm)

The source code looks pretty straightforward, but I don't think
there's anything in the standard library that does that.

-- 
Jerry

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


Thread

Deleting a file? "garyr" <garyr@fidalgo.net> - 2011-05-16 14:23 -0700
  Re: Deleting a file? Ben Finney <ben+python@benfinney.id.au> - 2011-05-17 11:39 +1000
  Re: Deleting a file? Jerry Hill <malaclypse2@gmail.com> - 2011-05-16 23:06 -0400
    Re: Deleting a file? "garyr" <garyr@fidalgo.net> - 2011-05-17 07:43 -0700

csiph-web