Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #69951

Re: "Latching" variables in function

Path csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!newsfeed.xs4all.nl!newsfeed2.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail
Return-Path <harrismh777@gmail.com>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.057
X-Spam-Evidence '*H*': 0.89; '*S*': 0.00; 'buttons': 0.09; 'generated,': 0.16; 'pressed': 0.16; 'received:10.20.200': 0.16; 'received:charter.net': 0.16; 'wrote:': 0.18; 'variable': 0.18; 'handles': 0.22; 'header:User-Agent:1': 0.23; 'button,': 0.24; 'push': 0.26; 'header:In-Reply-To:1': 0.27; 'received:24': 0.27; 'received:10.20': 0.33; 'something': 0.35; 'received:10': 0.37; 'button': 0.38; 'message-id:@gmail.com': 0.38; 'to:addr:python- list': 0.38; 'pm,': 0.38; 'subject:" ': 0.39; 'to:addr:python.org': 0.39; 'either': 0.39; 'event.': 0.60; 'radio': 0.60; 'box,': 0.64; 'become': 0.64
X-Authority-Analysis v=2.0 cv=Q7eKePKa c=1 sm=1 a=LkTX9YPXWU1lnSxlYEpgVg==:17 a=zewopLiEtFcA:10 a=wgbyeNipIyoA:10 a=nDghuxUhq_wA:10 a=IkcTkHD0fZMA:10 a=pGLkceISAAAA:8 a=asWdceJ9cU4p2-WMePgA:9 a=QEXdDO2ut3YA:10 a=LkTX9YPXWU1lnSxlYEpgVg==:117
Date Wed, 09 Apr 2014 08:53:19 -0500
From Mark H Harris <harrismh777@gmail.com>
User-Agent Mozilla/5.0 (Macintosh; Intel Mac OS X 10.6; rv:24.0) Gecko/20100101 Thunderbird/24.4.0
MIME-Version 1.0
To python-list@python.org
Subject Re: "Latching" variables in function
References <mailman.9045.1397000922.18130.python-list@python.org>
In-Reply-To <mailman.9045.1397000922.18130.python-list@python.org>
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 <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.9076.1397051608.18130.python-list@python.org> (permalink)
Lines 19
NNTP-Posting-Host 2001:888:2000:d::a6
X-Trace 1397051608 news.xs4all.nl 2840 [2001:888:2000:d::a6]:55929
X-Complaints-To abuse@xs4all.nl
Xref csiph.com comp.lang.python:69951

Show key headers only | View raw


On 4/8/14 3:09 PM, Grawburg wrote:

> I have a N/O pushbutton that I want to "latch" a value to a variable when it's been pressed.
> I need button_value to become '1' when the button is pressed and to remain '1' until ...

> What do I use to 'latch' button_value?

Philosophically speaking buttons don't latch. You push the button, an 
event is generated, and the call-back handles the event to do something 
in your project.

You might try setting a global variable on the button-push event.

Or, if I understand you, you might want to use a configurable, like a 
radio button or a check box, either of which are designed to be "latched".


marcus

Back to comp.lang.python | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

"Latching" variables in function Grawburg <grawburg@myglnc.com> - 2014-04-08 16:09 -0400
  Re: "Latching" variables in function Denis McMahon <denismfmcmahon@gmail.com> - 2014-04-09 00:28 +0000
  Re: "Latching" variables in function Mark H Harris <harrismh777@gmail.com> - 2014-04-09 08:53 -0500
    Re: "Latching" variables in function alister <alister.nospam.ware@ntlworld.com> - 2014-04-09 15:43 +0000

csiph-web