Path: csiph.com!usenet.pasdenom.info!weretis.net!feeder1.news.weretis.net!feeder.erje.net!eu.feeder.erje.net!bcyclone04.am1.xlned.com!bcyclone04.am1.xlned.com!newsfeed.xs4all.nl!newsfeed4a.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.008 X-Spam-Evidence: '*H*': 0.98; '*S*': 0.00; 'win32': 0.03; 'subject:file': 0.07; 'creation,': 0.09; 'to)': 0.09; 'subject:How': 0.10; 'cc:addr:python-list': 0.11; 'python': 0.11; '"in': 0.16; '5:30': 0.16; 'created.': 0.16; 'initially,': 0.16; 'saved.': 0.16; 'wrote:': 0.18; '(not': 0.18; 'thu,': 0.19; 'cc:addr:python.org': 0.22; 'creating': 0.23; 'replace': 0.24; 'looks': 0.24; 'cc:2**0': 0.24; "i've": 0.25; 'task': 0.26; 'header:In-Reply-To:1': 0.27; 'tried': 0.27; 'message- id:@mail.gmail.com': 0.30; 'url:mailman': 0.30; 'occurs': 0.31; 'file': 0.32; 'url:python': 0.33; 'running': 0.33; '(e.g.': 0.33; 'subject:the': 0.34; 'could': 0.34; 'problem': 0.35; 'but': 0.35; 'received:google.com': 0.35; 'disk': 0.36; 'url:listinfo': 0.36; 'method': 0.36; 'subject:?': 0.36; 'url:org': 0.36; 'should': 0.36; 'being': 0.38; 'pm,': 0.38; 'previous': 0.38; 'according': 0.40; 'url:mail': 0.40; 'save': 0.62; 'more': 0.64; '30,': 0.65; 'obvious': 0.74; 'you:': 0.81; 'joel': 0.91; 'to:none': 0.92 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:cc :content-type; bh=6EcyfMvA6xAt16WqCnlCG+tGgw7QFft1JgC2CBcmccU=; b=c6usnqV34iEUb1i7O86eb6u/Qb0zrYVIOARavH+FJK9kzeHc9tBfNAX38ZJ1NPz4+d Y4GO0le0Bf0ztWu8Sn4EzfAaqv2lkGmhMR77kzjJO6xrdF6ryVHbzVjYwWdWYQWBCev2 Ln+a9zTUP2sY3cIvJmqIWr1ASL9ZJF3RoBnsw6nNl7MpJPkvRvHPEJY5pPRa1VmPItQF vdWEIbjS8J9eP5cr1azGAPWH6kr02j9tXCOuXO4QdlMs1W+zxS0WaaUA/se/mvwqZ44j kJLzmxm24r9yMrQuAnMzR+BQnMtP4bek1bnl4nqEys7SHky66CKUlMirvCJdIK5bvLva dOzA== MIME-Version: 1.0 X-Received: by 10.229.172.134 with SMTP id l6mr30709340qcz.8.1414707681849; Thu, 30 Oct 2014 15:21:21 -0700 (PDT) In-Reply-To: <5452ADFD.5030801@it.uu.se> References: <5452ADFD.5030801@it.uu.se> Date: Thu, 30 Oct 2014 18:21:21 -0400 Subject: Re: Saving a file "in the background" -- How? From: Joel Goldstick Cc: "python-list@python.org" Content-Type: text/plain; charset=UTF-8 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: 26 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1414707690 news.xs4all.nl 2858 [2001:888:2000:d::a6]:38093 X-Complaints-To: abuse@xs4all.nl X-Received-Bytes: 4483 X-Received-Body-CRC: 1837456256 Xref: csiph.com comp.lang.python:79977 On Thu, Oct 30, 2014 at 5:30 PM, Virgil Stokes wrote: > 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? > -- > https://mail.python.org/mailman/listinfo/python-list I've not tried this, but stackoverflow has a solution that looks like it could work for you: http://stackoverflow.com/questions/16214736/write-data-to-disk-in-python-as-a-background-process -- Joel Goldstick http://joelgoldstick.com