Re: [Tutor] threading in python 2.7 - 2nd version

2015-01-04 Thread Cameron Simpson
On 04Jan2015 23:19, Rance Hall wrote: Thanks to the advice from Joseph and Alan, I hacked a quick python script which demonstrates my problem more accurately. Its not board specific as was my last code. This sample works the same on my pcduino as it does on my desktop. [...] [...] exitFlag = 0

Re: [Tutor] Could you look over my code?

2015-01-04 Thread Cameron Simpson
On 04Jan2015 21:33, Alex Kleider wrote: On 2015-01-04 18:39, Steven D'Aprano wrote: Hi Connor, and welcome. My response is below. It might be helpful to add to what Steven has told you: I use GNU/Linux but my wife uses Apple products and my limited experience with them is that typing python

Re: [Tutor] Could you look over my code?

2015-01-04 Thread Alex Kleider
On 2015-01-04 18:39, Steven D'Aprano wrote: Hi Connor, and welcome. My response is below. It might be helpful to add to what Steven has told you: I use GNU/Linux but my wife uses Apple products and my limited experience with them is that typing python at the command line will get you python2.

[Tutor] threading in python 2.7 - 2nd version

2015-01-04 Thread Rance Hall
Thanks to the advice from Joseph and Alan, I hacked a quick python script which demonstrates my problem more accurately. Its not board specific as was my last code. This sample works the same on my pcduino as it does on my desktop. #threading problem example import threading import sys impor

Re: [Tutor] Could you look over my code?

2015-01-04 Thread boB Stepp
On Sun, Jan 4, 2015 at 8:39 PM, Steven D'Aprano wrote: [...] > >> 2. Have a look at this code fro the book and tell me what to improve >> (This is a program where it says game over, and it waits for the user >> to press the enter key to quit: >> >> print(“Game Over”) >> input(“\n\nPress the enter

Re: [Tutor] Could you look over my code?

2015-01-04 Thread Steven D'Aprano
Hi Connor, and welcome. My response is below. On Sun, Jan 04, 2015 at 04:13:50PM +, Connor Perkis wrote: > Hello, I am currently learning python and I have a book to assist me > called ‘Python Programming For The Absolute Beginner (3E)’ and I’ve > just read the first chapter. I typed the co

Re: [Tutor] Could you look over my code?

2015-01-04 Thread Alan Gauld
On 04/01/15 16:13, Connor Perkis wrote: 1.How to execute .py files properly on Mac OSX Yosemite The best way when learning is to start a Terminal session and type at the Unix shell prompt: yourprompt$ python3 myfile.py 2. Have a look at this code fro the book and tell me what >to imp

[Tutor] Could you look over my code?

2015-01-04 Thread Connor Perkis
Hello, I am currently learning python and I have a book to assist me called ‘Python Programming For The Absolute Beginner (3E)’ and I’ve just read the first chapter. I typed the code. Would you be able to help me with: 1.How to execute .py files properly on Mac OSX Yosemite 2. Have a look at thi

Re: [Tutor] Seismometer alarm

2015-01-04 Thread Ted
Hi Dave, and All, I hope this reply is in the correct form. If not please advise. Here is what I have to date. 1. on line 7 below, myData = int (arduinoSerialData.readline()) Is this written correctly? I think the data coming from the arduino is strings, and I think I need int? Is t

Re: [Tutor] Seismometer alarm Python

2015-01-04 Thread Steven D'Aprano
On Sat, Jan 03, 2015 at 10:06:10AM -0700, Ted wrote: > Hi Folks, I have a small python code to write. It has at least three > parts, 1,2 and 3. I think I have 1 and 3 working. > > I do not know how this Tutor@python.org works, but if someone can > email me I can explain my questions. You can

Re: [Tutor] Seismometer alarm

2015-01-04 Thread Steven D'Aprano
On Sun, Jan 04, 2015 at 09:35:55AM -0500, Dave Angel wrote: > On 01/04/2015 08:17 AM, Ted wrote: > >On 03/01/15 19:19, Ted wrote: > >>Alan Thank you so much for the reply, attached is a screenshot of a > >>4.9M earthquake in Challis Idaho, about 150 miles north. > >>this is what I need the alarm f

Re: [Tutor] Seismometer alarm

2015-01-04 Thread Alan Gauld
On 04/01/15 13:17, Ted wrote: On 03/01/15 19:19, Ted wrote: Alan Thank you so much for the reply, No probs, but a few comments further to Dave A's reply. Some folks pay by the byte so please don;t attach large files such as screenshots. Post a link to a web site if you really need to show us

Re: [Tutor] Seismometer alarm

2015-01-04 Thread Dave Angel
On 01/04/2015 08:17 AM, Ted wrote: On 03/01/15 19:19, Ted wrote: Alan Thank you so much for the reply, attached is a screenshot of a 4.9M earthquake in Challis Idaho, about 150 miles north. this is what I need the alarm for. Ted, I don't know what mail program you're using, but you're not do

[Tutor] Seismometer alarm

2015-01-04 Thread Ted
On 03/01/15 19:19, Ted wrote: > Alan Thank you so much for the reply, attached is a screenshot of a > 4.9M earthquake in Challis Idaho, about 150 miles north. > this is what I need the alarm for. > > I am using Python 2.7? and Windows 7. > > 1. Should I reply-all, or ok to you? or either? Repl

Re: [Tutor] Improving My Simple Game Code for Speed, Memory and Learning

2015-01-04 Thread Steven D'Aprano
On Sat, Jan 03, 2015 at 09:57:20PM -0500, Dave Angel wrote: > On 01/03/2015 06:10 PM, WolfRage wrote: > >On 01/03/2015 04:42 PM, Dave Angel wrote: > >>self.transposed_grid = list( zip(*self.grid) ) > >This results in the same thing with or with out the list() wrapper. Using > >Python 3.4.0 (default