Re: [Tutor] Thread Object integration with GPIO

2017-04-29 Thread boB Stepp
On Sat, Apr 29, 2017 at 1:26 PM, Marc Eymard wrote: > Hello there, > Attached the script I have come up with, which keeps returning multiple > run time errors whenever I try to fix it. > I believe there are multiple issues, but at least it gives an idea of > what I currently want to achieve and h

Re: [Tutor] Another set question

2017-04-29 Thread Ben Finney
Phil writes: > It took me months to solve come up with a working solution in C++ > whereas I almost have a working solution in Python in a little over a > week. Welcome to Python, we're glad to hear of your success! -- \ “[Entrenched media corporations will] maintain the status quo, |

Re: [Tutor] Another set question

2017-04-29 Thread Phil
On Sat, 29 Apr 2017 20:27:17 +1000 Ben Finney wrote: > Why is the data in such a state that you can't decide how to use it > until you know whether it is a set versus a string? Can the data be > handled differently? We'll need to know what you're trying to achieve, > to answer properly. Thank yo

[Tutor] Thread Object integration with GPIO

2017-04-29 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 r

Re: [Tutor] Working with APIs - understanding the basics (Python 3.5)

2017-04-29 Thread Alan Gauld via Tutor
On 29/04/17 18:13, Rafael Knuth wrote: > can anyone recommend good resources? I am primarily in search of > simple, clean code examples & practical usecases (Google APIs for > example). An API is just a set of classes or functions. The Python standard library is an API. You already have lots of

[Tutor] Working with APIs - understanding the basics (Python 3.5)

2017-04-29 Thread Rafael Knuth
can anyone recommend good resources? I am primarily in search of simple, clean code examples & practical usecases (Google APIs for example). Thanks. Right now, I am learning at Codecademy, Dataquest.io, Datacamp and from "Python Crash Course" by Eric Matthews. I am new to programming, Python is my

Re: [Tutor] Another set question

2017-04-29 Thread Ben Finney
Phil writes: > Thank you Ben and Martin for your detailed replies. I was debating > whether or not to post my question at all because it looked vague, > even to me. That's not the issue; the question was posed clearly enough. The problem is that your purpose is opaque, and we have a strong suspi

Re: [Tutor] Another set question

2017-04-29 Thread Phil
On Fri, 28 Apr 2017 19:42:36 -0700 "Martin A. Brown" wrote: > > Hello and greetings Phil, > > >> I'm trying to implement a conditional branch based on a variable > >> type. > > > >This is often (not always) a mistake, in Python. So the question > >needs to be asked: What makes you think that co