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!newsfeed6.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.001 X-Spam-Evidence: '*H*': 1.00; '*S*': 0.00; 'subject:: [': 0.03; 'subject:Python': 0.05; 'completeness': 0.07; 'subject:file': 0.07; 'suppose': 0.07; 'subject:How': 0.09; 'expected.': 0.09; 'received:155': 0.09; 'throw': 0.09; 'slightly': 0.15; '"right"': 0.16; 'disclaimers': 0.16; 'disclaimers,': 0.16; 'from:addr:jpmorgan.com': 0.16; 'happily': 0.16; 'posix': 0.16; 'received:155.180': 0.16; 'received:159.53': 0.16; 'received:159.53.110': 0.16; 'received:159.53.110.174': 0.16; 'received:169.70': 0.16; 'received:169.70.184': 0.16; 'received:exchad.jpmchase.net': 0.16; 'received:jpmchase.com': 0.16; 'received:jpmchase.net': 0.16; 'received:sj2.jpmchase.com': 0.16; 'securities,': 0.16; 'temp': 0.16; 'trash': 0.16; 'url:disclosures': 0.16; 'url:jpmorgan': 0.16; 'deleted.': 0.17; 'subject:] ': 0.19; 'windows': 0.19; 'appropriate': 0.20; 'to:name :python-list@python.org': 0.20; 'file.': 0.20; 'error.': 0.21; 'own.': 0.22; 'work.': 0.23; 'received:169.254': 0.24; 'header:In- Reply-To:1': 0.25; 'handling': 0.27; 'accuracy': 0.27; 'opposed': 0.27; 'received:169': 0.29; 'probably': 0.29; 'usually': 0.30; 'header:Received:8': 0.30; 'towards': 0.32; 'file': 0.32; 'instances': 0.33; 'to:addr:python-list': 0.33; 'exist': 0.35; 'said,': 0.35; 'open': 0.35; 'something': 0.35; '(i.e.': 0.36; 'depends': 0.36; 'should': 0.36; 'too': 0.36; 'charset:us-ascii': 0.36; 'possible': 0.37; 'does': 0.37; 'being': 0.37; 'moment': 0.37; 'quite': 0.37; 'subject:: ': 0.38; 'files': 0.38; 'things': 0.38; 'sure': 0.38; 'delete': 0.38; 'to:addr:python.org': 0.39; 'think': 0.40; 'remove': 0.61; 'firm': 0.62; 'close': 0.63; 'information,': 0.63; 'url:email': 0.63; 'legal': 0.65; 'subject': 0.66; 'purchase': 0.67; 'believe': 0.69; 'saving': 0.72; 'sale': 0.76; '"too': 0.84; 'belief': 0.84; 'disappear': 0.84; 'lean': 0.84; 'received:169.254.8': 0.84; 'recycling': 0.84; 'subject:status': 0.84; 'trained': 0.95 X-DKIM: OpenDKIM Filter v2.1.3 sj2.jpmchase.com q6DI0ML9010136 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=jpmorgan.com; s=smtpout; t=1342202422; bh=cn3Eve+CPow/VHuPRIHo7pnUJ3GUgUGEgCg4bUfzd4Q=; h=From:To:Subject:Date:Message-ID:References:In-Reply-To: Content-Transfer-Encoding:MIME-Version:Content-Type; b=HdrshMCUk3qWnGzm5G7t56TM5Pwv1YiMsvGj7y2V66jreFVl6QXUW8KkyBy/1nYP2 8yr4CfdzIRs2dBvqO3tfV5t4Pp2lY6pTK5xttNJ1zCOEYrLl3Iqimwf2ff2cjZ+SY2 EM/idbFmepwkhlQ6JTg002RtFKKLWH336jDlUSBU= From: "Prasad, Ramit" To: "python-list@python.org" Subject: RE: [Python] RE: How to safely maintain a status file Thread-Topic: [Python] RE: How to safely maintain a status file Thread-Index: AQHNYKWEOBGDnrQ45Uy/2LQbKJxATJcm4RAAgAB9BNCAAF1WAP//xHSQ Date: Fri, 13 Jul 2012 17:59:59 +0000 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> <5B80DD153D7D744689F57F4FB69AF474165560E7@SCACMX008.exchad.jpmchase.net> <50005A96.3010305@gonnerman.org> In-Reply-To: <50005A96.3010305@gonnerman.org> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.67.79.47] Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-DLP-FWD: Yes Content-Type: text/plain; charset="us-ascii" 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: 25 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1342202431 news.xs4all.nl 6891 [2001:888:2000:d::a6]:45498 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:25280 > >> Well "neat tricks" aside, I am of the firm belief that deleting files= =0D=0A> should=0D=0A> >> never be possible whilst they are open=2E=0D=0A> >= This is one of the few instances I think Windows does something better=0D= =0A> > than OS X=2E Windows will check before you attempt to delete (i=2Ee= =2E move=0D=0A> > to Recycling Bin) while OS X will move a file to Trash qu= ite happily=0D=0A> > only tell me it cannot remove the file when I try to e= mpty the Trash=2E=0D=0A> While I was trained in the Unix way, and believe i= t is entirely=0D=0A> appropriate to delete an open file=2E Even if I my pr= ogram is the opener=2E=0D=0A> It's just too handy to have temp files that= disappear on their own=2E=0D=0A> =0D=0A> As opposed to periodically going = to %TEMP% and deleting them manually=2E Gah=2E=0D=0A=0D=0AIn my experience= things that are "too handy" are usually breaking=0D=0Awhat I consider "rig= ht"=2E That being said, I am not entirely sure=0D=0Awhat I think is "right"= in this circumstance=2E I suppose it depends=0D=0Aon if I am the person de= leting or the person who is looking at=0D=0Aa file that is being deleted=2E= Or the user who just wants the stupid=0D=0Acomputer to just Work=2E=0D=0A= =0D=0AI lean slightly towards the POSIX handling with the addition that =0D= =0Aany additional write should throw an error=2E You are now saving to =0D= =0Aa file that will not exist the moment you close it and that is probably = =0D=0Anot expected=2E=0D=0A=0D=0A=0D=0A=0D=0A=0D=0A=0D=0ARamit=0D=0AThis em= ail is confidential and subject to important disclaimers and=0D=0Acondition= s including on offers for the purchase or sale of=0D=0Asecurities, accuracy= and completeness of information, viruses,=0D=0Aconfidentiality, legal priv= ilege, and legal entity disclaimers,=0D=0Aavailable at http://www=2Ejpmorga= n=2Ecom/pages/disclosures/email=2E