Path: csiph.com!usenet.pasdenom.info!aioe.org!news.stack.nl!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.000 X-Spam-Evidence: '*H*': 1.00; '*S*': 0.00; 'subject:: [': 0.03; 'subject:Python': 0.05; 'subject:file': 0.07; 'subject:How': 0.09; 'closed.': 0.09; 'open()': 0.09; 'received:80.91': 0.09; 'received:80.91.229': 0.09; 'received:gmane.org': 0.09; 'received:list': 0.09; 'files.': 0.13; 'from:addr:cheimes.de': 0.16; 'from:addr:lists': 0.16; 'from:name:christian heimes': 0.16; 'message-id:@dough.gmane.org': 0.16; 'posix': 0.16; 'received:80.91.229.3': 0.16; 'received:plane.gmane.org': 0.16; 'subject:] ': 0.19; 'windows': 0.19; 'header:In-Reply-To:1': 0.25; 'header:User-Agent:1': 0.26; 'common': 0.26; 'disk': 0.27; 'header:X-Complaints-To:1': 0.28; 'call.': 0.30; 'file': 0.32; 'handle': 0.33; 'to:addr:python-list': 0.33; 'received:org': 0.36; 'possible': 0.37; 'subject:: ': 0.38; 'files': 0.38; 'to:addr:python.org': 0.39; 'header:Received:5': 0.40; 'soon': 0.70; 'subject:status': 0.84 X-Injected-Via-Gmane: http://gmane.org/ To: python-list@python.org From: Christian Heimes Subject: Re: [Python] RE: How to safely maintain a status file Date: Fri, 13 Jul 2012 22:21:39 +0200 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> <500068bd$0$6893$e4fe514c@news2.news.xs4all.nl> <50007DAE.4050707@mrabarnett.plus.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Gmane-NNTP-Posting-Host: f048077172.adsl.alicedsl.de User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:12.0) Gecko/20120430 Thunderbird/12.0.1 In-Reply-To: <50007DAE.4050707@mrabarnett.plus.com> 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: 8 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1342210912 news.xs4all.nl 6840 [2001:888:2000:d::a6]:60959 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:25289 Am 13.07.2012 21:57, schrieb MRAB: > It's possible to create a temporary file even in Windows. Windows has a open() flag named O_TEMPORARY for temporary files. With O_TEMPORARY the file is removed from disk as soon as the file handle is closed. On POSIX OS it's common practice to unlink temporary files immediately after the open() call.