[Tutor] advice on global variables

Don Jennings dfjennings at gmail.com
Wed Jul 11 14:34:47 CEST 2012


On Jul 11, 2012, at 4:48 AM, tutor-request at python.org wrote:

> Message: 1
> Date: Tue, 10 Jul 2012 19:31:09 -0500
> From: Chris Hare <chare at labr.net>
> To: tutor at python.org
> Subject: Re: [Tutor] advice on global variables
> Message-ID: <38EBADCE-C2B1-4F15-B6E1-CB725F80007E at labr.net>
> Content-Type: text/plain; charset=windows-1252
> 
> 
> On Jul 10, 2012, at 6:24 PM, Alan Gauld wrote:
> 
>> On 11/07/12 00:16, Alan Gauld wrote:
>> 
>>>> One thought was a RAM based SQLite database, but that seems
>>>> like a lot of work.  I dunno, maybe that is the option.
>>> 
>>> is definitely the best option where the "global" needs to be shared
>>> across different programs as well as different modules in a single
>> 
>> I meant to add its also the right technique where the 'global' value has to persist between different execution cycles of the program. (Or indeed any kind of value needs to persist across execution cycles!)
>> 
> 
> Thanks Alan -- I am thinking I am just gonna go with the RAM based SQLite database ?. 

Another option you might want to consider is the y_serial module [1] as it's a lot less work and allows you to **keep** thinking in python :>)

Take care,
Don

[1] http://yserial.sourceforge.net/

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/tutor/attachments/20120711/9b2d6bc1/attachment.html>


More information about the Tutor mailing list