Path: csiph.com!usenet.pasdenom.info!gegeweb.org!de-l.enfer-du-nord.net!feeder1.enfer-du-nord.net!feeds.phibee-telecom.net!newsfeed.xs4all.nl!newsfeed5.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.009 X-Spam-Evidence: '*H*': 0.98; '*S*': 0.00; 'example:': 0.03; 'subject:file': 0.07; 'suppose': 0.07; 'subject:How': 0.09; 'python': 0.09; 'files.': 0.13; 'file;': 0.16; 'filenames.': 0.16; 'from:addr:rosuav': 0.16; 'from:name:chris angelico': 0.16; 'opened,': 0.16; 'posix': 0.16; 'wrote:': 0.17; 'exists': 0.17; 'obviously': 0.18; 'windows': 0.19; 'received:209.85.214.174': 0.21; 'lets': 0.22; 'permitted': 0.22; 'simpler': 0.22; 'somebody': 0.23; 'seems': 0.23; 'tried': 0.25; 'header:In-Reply- To:1': 0.25; 'message-id:@mail.gmail.com': 0.27; "doesn't": 0.28; "d'aprano": 0.29; 'steven': 0.29; 'fri,': 0.30; 'thursday,': 0.30; 'system,': 0.32; 'file': 0.32; 'to:addr:python-list': 0.33; "can't": 0.34; 'received:google.com': 0.34; 'christian': 0.34; 'consistent': 0.35; 'otherwise.': 0.35; 'open': 0.35; 'pm,': 0.35; 'received:209.85': 0.35; '12,': 0.36; 'operating': 0.36; 'does': 0.37; 'two': 0.37; 'being': 0.37; 'why': 0.37; 'received:209': 0.37; 'subject:: ': 0.38; 'files': 0.38; 'comment': 0.38; 'object': 0.38; 'some': 0.38; 'delete': 0.38; 'to:addr:python.org': 0.39; 'received:209.85.214': 0.39; 'header:Received:5': 0.40; 'july': 0.60; 'jul': 0.65; 'response.': 0.67; 'direct': 0.69; 'discovered': 0.83; 'reading,': 0.84; 'subject:status': 0.84; 'rick': 0.91 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=2OsCbKk6juyrcJEVcqGH0f3/88CWwAZflLZYb9ZXPfc=; b=BbaVKo6NFMX0LGm2cGsN++qOvx6X7KPqnzu22zeyk7m3QPy8MhwcvMMvsehC27MgzE jy0v4pIAJJU/xPoeC/fUULNhjjSo4XqFo4Y86O2Zn933Mh8+nLO6ElTHntZBPgar8X03 jcey9X/MPB5PlaN5UodphOiYmcxGoTGHVmgGGwq/+0/u3J+/PzDfIzvlIx7ktIbw1VcJ iR0X/4C2IQAvxFloHk3v5ZzwDTX1GizWroI6CV3L6aiU8VjfWD8WNXZ06BkJBPTLM51y Ntj4kkkLIaygodhepRr0a5nHnVvCs9NYYNHq34v/tWplVCdOSsx4bYTTTK71yy3BeVi1 T/nQ== MIME-Version: 1.0 In-Reply-To: <62e90523-a160-4e28-8109-9ce32d8952e1@googlegroups.com> References: <4FF9F454.40207@shopzeus.com> <4ffecef4$0$6877$e4fe514c@news2.news.xs4all.nl> <4FFF0CB7.3030007@shopzeus.com> <4fff926b$0$29965$c3e8da3$5496439d@news.astraweb.com> <62e90523-a160-4e28-8109-9ce32d8952e1@googlegroups.com> Date: Fri, 13 Jul 2012 16:02:13 +1000 Subject: Re: How to safely maintain a status file From: Chris Angelico To: python-list@python.org Content-Type: text/plain; charset=ISO-8859-1 X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.python Message-ID: Lines: 22 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1342159337 news.xs4all.nl 6855 [2001:888:2000:d::a6]:57698 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:25247 On Fri, Jul 13, 2012 at 2:26 PM, wrote: > On Thursday, July 12, 2012 10:13:47 PM UTC-5, Steven D'Aprano wrote: >> Rick has obviously never tried to open a file for reading when somebody >> else has it opened, also for reading, and discovered that despite Windows >> being allegedly a multi-user operating system, you can't actually have >> multiple users read the same files at the same time. > > You misread my response. My comment was direct result of Christian stating: > > (paraphrase) "On some systems you are not permitted to delete a file whilst the file is open " > > ...which seems to be consistent to me. Why would *anybody* want to delete a file whilst the file is open? POSIX doesn't let you delete files. It lets you dispose of filenames. Python does the same with its 'del'. The object (file) exists until the system decides otherwise. Here's a simpler example: Hardlinks. Suppose you have two names pointing to the same file; are you allowed to unlink one of them while you have the "other" open? ChrisA