|
While learning COBOL and SQL at college we had computer time (mainframe at a remote location and not in the college) once a week, 45 minutes...So we prepared all our code on paper and went to type in an run...
Skipper: We'll fix it.
Alex: Fix it? How you gonna fix this?
Skipper: Grit, spit and a whole lotta duct tape.
|
|
|
|
|
Why don't Stormtroopers like Wookie steaks?
They're a little Chewy...
Bad command or file name. Bad, bad command! Sit! Stay! Staaaay...
|
|
|
|
|
Where did you Leia your coat?
Mongo: Mongo only pawn... in game of life.
|
|
|
|
|
Take that one bacca.
"the debugger doesn't tell me anything because this code compiles just fine" - random QA comment
"Facebook is where you tell lies to your friends. Twitter is where you tell the truth to strangers." - chriselst
"I don't drink any more... then again, I don't drink any less." - Mike Mullikins uncle
|
|
|
|
|
Luke, I made a pun too.
|
|
|
|
|
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!”);
}
|
|
|
|
|
Eh, it's not that bad. I actually like Python. Just stick with 2.7.x and make sure your editor converts tabs into spaces, you'll be fine.
|
|
|
|
|
|
Things that women cannot reverse cars into.
|
|
|
|
|
|
Tory smear.
|
|
|
|
|
|
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!!!!!!!
|
|
|
|
|
|
Karel Čapek wrote: What are 'spaces'?
static_cast<char>(0x20)
|
|
|
|
|
Nemanja Trifunovic wrote: spaces
#SupportHeForShe If your actions inspire others to dream more, learn more, do more and become more, you are a leader.-John Q. Adams
You must accept 1 of 2 basic premises: Either we are alone in the universe or we are not alone. Either way, the implications are staggering!-Wernher von Braun
Only 2 things are infinite, the universe and human stupidity, and I'm not sure about the former.-Albert Einstein
|
|
|
|
|
My tab does 4 spaces in Notepad++ and in the Pi IDE.
Also I can't get global variables visible through out the scrip especially in If statements.
I'm using 2.7 as well.
|
|
|
|
|
I prefer working in the Python3 branch. The newer facilities are nice, and I have no legacy code to maintain (a rare luxury
Sarcasm - it's not just a verbal skill - it's a lifestyle!
|
|
|
|
|
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.
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. I really am.
|
|
|
|
|
I have called my Raspberry Pi many things. Some of them are not printable.
|
|
|
|
|
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.
|
|
|
|
|
Yes o' master of RPi willco
|
|
|
|
|
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.
|
|
|
|
|
Earl Owens wrote: How hard can learning a scripting language be?
Clearly, you've never done any hardcore JavaScript development.
Jeremy Falcon
|
|
|
|
|
I use JavaScript only if I have to, but it is looking more and more there is no escaping it.
|
|
|
|