Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!usenet.blueworldhosting.com!feeder01.blueworldhosting.com!feeder.erje.net!eu.feeder.erje.net!newsfeed.fsmpi.rwth-aachen.de!newsfeed.kamp.net!newsfeed.kamp.net!feeder1.cambriumusenet.nl!82.197.223.103.MISMATCH!feeder3.cambriumusenet.nl!feed.tweaknews.nl!194.109.133.87.MISMATCH!newsfeed.xs4all.nl!newsfeed1a.news.xs4all.nl!xs4all!newsgate.cistron.nl!newsgate.news.xs4all.nl!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.006 X-Spam-Evidence: '*H*': 0.99; '*S*': 0.00; 'win32': 0.03; 'subject:file': 0.07; 'creation,': 0.09; 'to)': 0.09; 'subject:How': 0.10; 'python': 0.11; '"in': 0.16; 'created.': 0.16; 'initially,': 0.16; 'saved.': 0.16; '(not': 0.18; 'to:name :python-list@python.org': 0.22; 'creating': 0.23; 'header:User- Agent:1': 0.23; 'replace': 0.24; 'task': 0.26; 'occurs': 0.31; 'file': 0.32; 'running': 0.33; '(e.g.': 0.33; 'subject:the': 0.34; 'problem': 0.35; 'but': 0.35; 'disk': 0.36; 'method': 0.36; 'subject:?': 0.36; 'should': 0.36; 'being': 0.38; 'to:addr:python- list': 0.38; 'previous': 0.38; 'to:addr:python.org': 0.39; 'according': 0.40; 'save': 0.62; 'more': 0.64; 'obvious': 0.74 X-SENDER-IP: [213.112.57.94] X-LISTENER: [smtp.bredband.net] X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AnkKAPKsUlTVcDlePGdsb2JhbABcgkFMhDOEN7YgjzKJGQEBAQEBAQUBAQEBODCENxVANgIFFgsCCwMCAQIBMRoNCAEBiEEBpk6PQpUfgSySYYFUBZhRnSqCMoM2AQEB X-IPAS-Result: AnkKAPKsUlTVcDlePGdsb2JhbABcgkFMhDOEN7YgjzKJGQEBAQEBAQUBAQEBODCENxVANgIFFgsCCwMCAQIBMRoNCAEBiEEBpk6PQpUfgSySYYFUBZhRnSqCMoM2AQEB X-IronPort-AV: E=Sophos;i="5.07,289,1413237600"; d="scan'208";a="754729307" Date: Thu, 30 Oct 2014 22:30:37 +0100 From: Virgil Stokes User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:31.0) Gecko/20100101 Thunderbird/31.2.0 MIME-Version: 1.0 To: "python-list@python.org" Subject: Saving a file "in the background" -- How? Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.15 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: 15 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1414706036 news.xs4all.nl 2860 [2001:888:2000:d::a6]:58980 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:79975 While running a python program I need to save some of the data that is being created. I would like to save the data to a file on a disk according to a periodical schedule (e.g. every 10 minutes). Initially, the amount of data is small (< 1 MB) but after sometime the amount of data can be >10MB. If a problem occurs during data creation, then the user should be able to start over from the last successfully saved data. For my particular application, no other file is being saved and the data should always replace (not be appended to) the previous data saved. It is important that the data be saved without any obvious distraction to the user who is busy creating more data. That is, I would like to save the data "in the background". What is a good method to perform this task using Python 2.7.8 on a Win32 platform?