Re: [Tutor] Thread Object integration with GPIO

2017-04-30 Thread Steven D'Aprano
On Sat, Apr 29, 2017 at 06:26:28PM +, Marc Eymard wrote: > The way I have decided to go about implementing the sensor reading is by > creating a Thread object and update the distance attribute of this very > same object from the run() function. The idea is to encapsulate the > distance read

[Tutor] Thread Object integration with GPIO

2017-04-30 Thread Marc Eymard
Hello there, I have hooked up an ultrasonic sensor to my Raspberry Pi-enabled robot in order to get continuous distance-to-obstacle reading. The sensor is properly connected via GPIO and already reads the distance properly when running a simple script. However, I need to integrate the sensor rea

[Tutor] Python 3.6 Extract Floating Point Data from a Text File

2017-04-30 Thread Stephen P. Molnar
I am using the Spyder v-3.1.2 IDE and porting a FORTRAN program that I wrote about 20 years ago to Python Unfortunately, I am very much a novice in Python . I would have managed to extract input data from another calculation (not a Python program) into the following text file. LOEWDIN ATO

Re: [Tutor] How to display radiobutton window with no buttons selected?

2017-04-30 Thread Alan Gauld via Tutor
On 25/04/17 12:39, boB Stepp wrote: >>> I wish the displayed window to initially display with no button >>> selected. What am I missing here? >> >> It looks like the empty string is special. On my (linux) system all buttons >> appear grayed (while a selected button would be black). Any other stri

Re: [Tutor] Another set question

2017-04-30 Thread Alan Gauld via Tutor
On 30/04/17 00:58, Phil wrote: > Thank you Ben. A rethink of the problem during the 20 hours since > I posted my most recent question has led to a solution. You don;t say what so i'll go with what you say below... > The strings are the given numbers while the sets are > the likely candidates.

Re: [Tutor] Tkinter layout question

2017-04-30 Thread Alan Gauld via Tutor
On 26/04/17 07:56, Phil wrote: >> Your messages come into the moderation queue, I'm > > Thanks Alan, maybe the reason ...is because I'm > on the bounces list. I don;t know what bounces list you mean but it looks like your messages are going through directly now, I don't know what changed... Po

Re: [Tutor] Python 3.6 Extract Floating Point Data from a Text File

2017-04-30 Thread boB Stepp
Hello Stephen! On Sun, Apr 30, 2017 at 5:09 AM, Stephen P. Molnar wrote: > > I am using the Spyder v-3.1.2 IDE and porting a FORTRAN program that I wrote > about 20 years ago to Python Unfortunately, I am very much a novice in > Python . > > I would have managed to extract input data from anothe

Re: [Tutor] Python 3.6 Extract Floating Point Data from a Text File

2017-04-30 Thread Steven D'Aprano
On Sun, Apr 30, 2017 at 06:09:12AM -0400, Stephen P. Molnar wrote: [...] > I would have managed to extract input data from another calculation (not > a Python program) into the following text file. > > LOEWDIN ATOMIC CHARGES > -- > 0 C : -0.780631 > 1 H :0.11457

[Tutor] Fwd: Re: Python 3.6 Extract Floating Point Data from a Text File

2017-04-30 Thread Alan Gauld via Tutor
How, embarrassing, I forgot to CC the list! :-) On 30/04/17 11:09, Stephen P. Molnar wrote: > I would have managed to extract input data from another calculation (not > a Python program) into the following text file. > > LOEWDIN ATOMIC CHARGES > -- > 0 C : -0.78063

Re: [Tutor] Python 3.6 Extract Floating Point Data from a Text File

2017-04-30 Thread Stephen P. Molnar
On 04/30/2017 02:02 PM, Steven D'Aprano wrote: On Sun, Apr 30, 2017 at 06:09:12AM -0400, Stephen P. Molnar wrote: [...] I would have managed to extract input data from another calculation (not a Python program) into the following text file. LOEWDIN ATOMIC CHARGES -- 0

Re: [Tutor] Another set question

2017-04-30 Thread Phil
On Sun, 30 Apr 2017 15:58:13 +0100 Alan Gauld via Tutor wrote: > I would probably combine both such that for each cell you > have a tuple containing the given number and the set of > candidates. In some cases the number may be a sentinel > (such as -1) to indicate no number yet, and for some > ce