Python and the Pi
-
Allow me to insert my gratuitous self-promotion here AND answer your question. It just so happens I've written quite a few Python programs and I own a RPi -- anyone who knows anything about RPi knows that you refer to it as RPi. :D The thing is if you are trying to do stuff with a UI, then you are probably looking for Tkinter help. Tkinter is ugly. But, my point -- and I do have one -- is that my simple Tkinter examples, which I wrote on a PC with Python work with no changes on the RPi. Here's my self promotion: My book at amazon.com Learn Python, Think Python[^]. For all you downvoters: I'm answering a question about RPi. :D I really am.
-
What are 'spaces'?
Karel Čapek wrote:
What are 'spaces'?
Yes, alas, Python uses spaces (whitespace) as a delimiter for code blocks. It is the most horrendous thing about Python. You will get (random) errors because of spacing problems in your code. agh! "Hey, let's use a non-printable char as the delimiter in our language.", Sincerely Guido Van Rossum The rest of the world, shouting.... Nooooooooooooooooooo!!!!!!!
-
Earl Owens wrote:
Raspberry Pi
You are going to have to start referring to it as RPi, okay? Otherwise I will think of you as a nube. :D
-
Bought a Raspberry Pi and everything I can find about programming it calls for Python. So thinking, “How hard can learning a scripting language be?” I dove head long into it. Most of the code examples I have found are poop. Indenting makes me long for curly braces. Then there’s 2.7.9 and 3.4.3, where 3.4.3 is not backwardly compatible. Then there is the worship of the great Guido. BTW, seems that the Linux kiddies are using it in a large way. Bottom line is if I’m going to get anything out of the Pi, it’s just hack it and go. Sigh() { Response.write(“What do you mean unexpected indent!”); }
Earl Owens wrote:
How hard can learning a scripting language be?
Clearly, you've never done any hardcore JavaScript development.
Jeremy Falcon
-
Earl Owens wrote:
Raspberry Pi
You are going to have to start referring to it as RPi, okay? Otherwise I will think of you as a nube. :D
-
What are 'spaces'?
(sfw music (no)video) Space is only noise[^]
I'd rather be phishing!
-
Earl Owens wrote:
How hard can learning a scripting language be?
Clearly, you've never done any hardcore JavaScript development.
Jeremy Falcon
-
I haven't done much that is interesting with the RPi, unfortunately. I have learned how to connect it directly to my PC via ethernet so I can SSH directly to it and don't have to have a separate screen. I need to work with the GPIO but I've been lazy so far.
-
What are 'spaces'?
-
I use JavaScript only if I have to, but it is looking more and more there is no escaping it.
It's the future of the web man, may as well jump on board.
Jeremy Falcon
-
Bought a Raspberry Pi and everything I can find about programming it calls for Python. So thinking, “How hard can learning a scripting language be?” I dove head long into it. Most of the code examples I have found are poop. Indenting makes me long for curly braces. Then there’s 2.7.9 and 3.4.3, where 3.4.3 is not backwardly compatible. Then there is the worship of the great Guido. BTW, seems that the Linux kiddies are using it in a large way. Bottom line is if I’m going to get anything out of the Pi, it’s just hack it and go. Sigh() { Response.write(“What do you mean unexpected indent!”); }
Pi running Linux and Linux can have mono and mono can run any .NET language you choose... http://logicalgenetics.com/raspberry-pi-and-mono-hello-world/[^]
Skipper: We'll fix it. Alex: Fix it? How you gonna fix this? Skipper: Grit, spit and a whole lotta duct tape.
-
Earl Owens wrote:
How hard can learning a scripting language be?
Clearly, you've never done any hardcore JavaScript development.
Jeremy Falcon
-
Bought a Raspberry Pi and everything I can find about programming it calls for Python. So thinking, “How hard can learning a scripting language be?” I dove head long into it. Most of the code examples I have found are poop. Indenting makes me long for curly braces. Then there’s 2.7.9 and 3.4.3, where 3.4.3 is not backwardly compatible. Then there is the worship of the great Guido. BTW, seems that the Linux kiddies are using it in a large way. Bottom line is if I’m going to get anything out of the Pi, it’s just hack it and go. Sigh() { Response.write(“What do you mean unexpected indent!”); }
For what it's worth, you can also program it with C/C++. I use the same IDE (Code::Blocks) in Windows, x64 Linux and on the RasPi. In combination with wxWidgets and a wx design tool of your choice it makes for nice suite. The only thing I'm missing is a socket library on the old version of Raspian that I have.
"When I was 5 years old, my mother always told me that happiness was the key to life. When I went to school, they asked me what I wanted to be when I grew up. I wrote down 'happy'. They told me I didn't understand the assignment, and I told them they didn't understand life." - John Lennon