Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #62720
| Path | csiph.com!usenet.pasdenom.info!dedibox.gegeweb.org!gegeweb.eu!nntpfeed.proxad.net!proxad.net!feeder1-2.proxad.net!usenet-fr.net!nerim.net!novso.com!newsfeed.xs4all.nl!newsfeed1.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail |
|---|---|
| Return-Path | <rosuav@gmail.com> |
| X-Original-To | python-list@python.org |
| Delivered-To | python-list@mail.python.org |
| X-Spam-Status | OK 0.013 |
| X-Spam-Evidence | '*H*': 0.97; '*S*': 0.00; 'read.': 0.03; 'importing': 0.05; 'socket': 0.07; 'subject:question': 0.10; 'cc:addr:python- list': 0.11; 'python': 0.11; 'from:addr:rosuav': 0.16; 'from:name:chris angelico': 0.16; 'scripts.': 0.16; 'simpson': 0.16; 'sync': 0.16; 'temperatures': 0.16; 'write,': 0.16; 'followed': 0.16; 'wrote:': 0.18; 'obviously': 0.18; 'wed,': 0.18; 'thu,': 0.19; 'cc:addr:python.org': 0.22; 'cc:2**0': 0.24; 'script': 0.25; 'values': 0.27; 'header:In-Reply-To:1': 0.27; 'idea': 0.28; 'dec': 0.30; 'needed.': 0.30; 'message- id:@mail.gmail.com': 0.30; 'anyone': 0.31; 'file': 0.32; 'another': 0.32; 'open': 0.33; "i'd": 0.34; 'problem': 0.35; 'but': 0.35; 'received:google.com': 0.35; 'too': 0.37; 'easiest': 0.38; 'files': 0.38; 'pm,': 0.38; 'rather': 0.38; 'little': 0.38; 'does': 0.39; 'read': 0.60; 'simply': 0.61; 'simple': 0.61; 'making': 0.63; 'kind': 0.63; 'provide': 0.64; 'more': 0.64; '26,': 0.68; 'feeling': 0.68; 'processes,': 0.91; 'to:none': 0.92; '2013': 0.98 |
| 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=6iP4xaKRwksBqQ+vuK+51bairlNITkUaJEjLwzb4qBw=; b=aujoLyC5uwx5Gk+uBSKtVnvvBy3RMQO7GkCiNm4XwkNzE740JYb6cEH4/2nTkQ5Wgn 3oj2mO/A9ENIl0+rLm7fNnPeGnioINvGsu9mcyYbL4IFUbxk/rsG3ZzNIeCqruRUuxGK aGwK41cgwaQjPKCR6aAsO9Yjp+Gm06YZ8nruAv0xymr6zzC/vftpYhqlBjItroybtlGo O/nDYqag2oOW/xFx7xupcOEc4+gVlUhkPyVNnEwVSnKFu4bPc7cvVb7/6vedT/rbZsks TMhRSF39lt1T1udXNErlYzAYDOMw492i1jcW98hKGTSImAL6U0ZvFFVMkdxMLiC9mp4w E7gA== |
| MIME-Version | 1.0 |
| X-Received | by 10.68.196.69 with SMTP id ik5mr41250015pbc.132.1388021748859; Wed, 25 Dec 2013 17:35:48 -0800 (PST) |
| In-Reply-To | <20131226010126.GA17868@cskk.homeip.net> |
| References | <l9ethr$o4o$1@dont-email.me> <20131226010126.GA17868@cskk.homeip.net> |
| Date | Thu, 26 Dec 2013 12:35:48 +1100 |
| Subject | Re: Variables in a loop, Newby question |
| From | Chris Angelico <rosuav@gmail.com> |
| Cc | "python-list@python.org" <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 <python-list.python.org> |
| List-Unsubscribe | <https://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe> |
| List-Archive | <http://mail.python.org/pipermail/python-list/> |
| List-Post | <mailto:python-list@python.org> |
| List-Help | <mailto:python-list-request@python.org?subject=help> |
| List-Subscribe | <https://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe> |
| Newsgroups | comp.lang.python |
| Message-ID | <mailman.4619.1388021757.18130.python-list@python.org> (permalink) |
| Lines | 29 |
| NNTP-Posting-Host | 2001:888:2000:d::a6 |
| X-Trace | 1388021757 news.xs4all.nl 2831 [2001:888:2000:d::a6]:40176 |
| X-Complaints-To | abuse@xs4all.nl |
| Xref | csiph.com comp.lang.python:62720 |
Show key headers only | View raw
On Thu, Dec 26, 2013 at 12:01 PM, Cameron Simpson <cs@zip.com.au> wrote: > On 25Dec2013 15:27, Denis McMahon <denismfmcmahon@gmail.com> wrote: >> On Wed, 25 Dec 2013 16:42:47 +1100, Cameron Simpson wrote: >> > On 25Dec2013 02:54, Denis McMahon <denismfmcmahon@gmail.com> wrote: >> >> On Tue, 24 Dec 2013 10:27:13 -0800, vanommen.robert wrote: >> >> > In this script i want to read the temperatures and make them >> >> > available to other scripts. [...] >> >> If you want this process to provide data to other processes, you might >> >> want to look at using a socket so they can request it as needed. >> > >> > Or just write it to a file for another process to open and read... >> >> That can cause io sync errors, eg if another process has the file opened >> for read when you try to write, or you are writing when they try to read. > > Well, obviously synchronisation of some kind is needed. The easiest > is write-new-file-with-temp-name followed by rename(). Atomic. Lock > files are also not too hard, etc. Does anyone else have the vague feeling that the OP's problem might be better served by simply importing the script (thus making those values available to another Python script) than by any of these rather more complicated theories? Of course, this requires a little more clarification from the OP, but I'd rather posit the simple idea and see it knocked down before going on to the complex :) ChrisA
Back to comp.lang.python | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Variables in a loop, Newby question vanommen.robert@gmail.com - 2013-12-24 08:07 -0800
Re: Variables in a loop, Newby question Joel Goldstick <joel.goldstick@gmail.com> - 2013-12-24 11:20 -0500
Re: Variables in a loop, Newby question "Tobias M." <tm@tobix.eu> - 2013-12-24 17:24 +0100
Re: Variables in a loop, Newby question Peter Otten <__peter__@web.de> - 2013-12-24 17:29 +0100
Re: Variables in a loop, Newby question bob gailer <bgailer@gmail.com> - 2013-12-24 12:26 -0500
Re: Variables in a loop, Newby question vanommen.robert@gmail.com - 2013-12-24 09:54 -0800
Re: Variables in a loop, Newby question Joel Goldstick <joel.goldstick@gmail.com> - 2013-12-24 13:10 -0500
Re: Variables in a loop, Newby question Dave Angel <davea@davea.name> - 2013-12-24 13:42 -0500
Re: Variables in a loop, Newby question Dennis Lee Bieber <wlfraed@ix.netcom.com> - 2013-12-25 13:35 -0500
Re: Variables in a loop, Newby question vanommen.robert@gmail.com - 2013-12-24 10:27 -0800
Re: Variables in a loop, Newby question Denis McMahon <denismfmcmahon@gmail.com> - 2013-12-25 02:54 +0000
Re: Variables in a loop, Newby question Cameron Simpson <cs@zip.com.au> - 2013-12-25 16:42 +1100
Re: Variables in a loop, Newby question Denis McMahon <denismfmcmahon@gmail.com> - 2013-12-25 15:27 +0000
Re: Variables in a loop, Newby question Cameron Simpson <cs@zip.com.au> - 2013-12-26 12:01 +1100
Re: Variables in a loop, Newby question Chris Angelico <rosuav@gmail.com> - 2013-12-26 12:35 +1100
Re: Variables in a loop, Newby question Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2013-12-26 16:41 +1100
Re: Variables in a loop, Newby question Dave Angel <davea@davea.name> - 2013-12-26 03:14 -0500
Re: Variables in a loop, Newby question Chris Angelico <rosuav@gmail.com> - 2013-12-26 19:24 +1100
Re: Variables in a loop, Newby question Peter Otten <__peter__@web.de> - 2013-12-25 15:52 +0100
Re: Variables in a loop, Newby question Michael Torrie <torriem@gmail.com> - 2013-12-25 23:34 -0700
Re: Variables in a loop, Newby question Larry Hudson <orgnut@yahoo.com> - 2013-12-25 00:13 -0800
Re: Variables in a loop, Newby question vanommen.robert@gmail.com - 2013-12-27 00:53 -0800
Re: Variables in a loop, Newby question Dennis Lee Bieber <wlfraed@ix.netcom.com> - 2013-12-27 11:39 -0500
csiph-web