PickyBiker
Posts: 68
Joined: Tue Nov 26, 2013 6:26 pm
Location: Texas

Python a good choice?

Tue Nov 26, 2013 11:37 pm

I am about to buy a Pi starter kit, monitor, kbd, and a mouse. I hope Python is a good general purpose language for this little machine but I would like experienced user comments on that. I have fair C and Basic skills and I suspect the bulk of my programming will be related to simple games and RC robot projects.

Is Python the right way to go?

Thanks,

PickyBiker
(I screwed up my registration and got PickyBiler, but it was intended to be PickyBiker. Havent figured out how to change that yet).)

ame
Posts: 3172
Joined: Sat Aug 18, 2012 1:21 am
Location: Korea

Re: Python a good choice?

Wed Nov 27, 2013 12:31 am

Python is an excellent choice for many programming problems.

If you don't like it you can always drop back to C, or any one of a number of other languages. Spending time learning a bit of Python would not be wasted however.

adespicer
Posts: 3
Joined: Wed Nov 27, 2013 12:04 am

Re: Python a good choice?

Wed Nov 27, 2013 12:37 am

Very good choice. I used it to prototype a large software system currently used by the UK MOD, and for adding functionality to Windows applications using the 'back door' approach.

Also, there are so many excellent free python apps available, you can do practically anything for minimal effort.

PickyBiker
Posts: 68
Joined: Tue Nov 26, 2013 6:26 pm
Location: Texas

Re: Python a good choice?

Wed Nov 27, 2013 2:07 am

Thanks for the feedback. It looks like Python is what I will use.

Got recommendations for good Python Programming books?

ame
Posts: 3172
Joined: Sat Aug 18, 2012 1:21 am
Location: Korea

Re: Python a good choice?

Wed Nov 27, 2013 2:13 am

Just use the internet and follow your nose. You can read a lot of tutorials on line, but you have a specific application in mind, so you should look at other people's Python projects and learn by example.

For a useful progressive learning programme check out Dive Into Python:
http://www.diveintopython.net/

User avatar
DougieLawson
Posts: 36098
Joined: Sun Jun 16, 2013 11:19 pm
Location: Basingstoke, UK
Contact: Website Twitter

Re: Python a good choice?

Wed Nov 27, 2013 2:18 am

Python is a reasonable choice for an interpreted language with a form of bytecode. It is, however, horribly picky on syntax compared to other scripting languages (rexx, clist, perl, php). But, that may be a advantage. It doesn't have a switch/case construct by default (and if ... elif ... else can get very much out of control) which was a surprise. [Although I found a code sample to add switch/case.]

I'm yet to be convinced that python should be the language of choice.

For speed I'd probably resort to C.

Some day I'll read the ARM1176JZF-S Technical Reference and teach myself ARM assembler.
Note: Having anything humorous in your signature is completely banned on this forum. Wear a tin-foil hat and you'll get a ban.

Any DMs sent on Twitter will be answered next month.

This is a doctor free zone.

asPie
Posts: 4
Joined: Wed Nov 20, 2013 6:35 am
Location: Birmingham, UK

Re: Python a good choice?

Wed Nov 27, 2013 2:34 am

PickyBiler wrote:Thanks for the feedback. It looks like Python is what I will use.

Got recommendations for good Python Programming books?
http://www.raspberrypi.org/phpBB3/viewt ... =49&t=6220

Heater
Posts: 13277
Joined: Tue Jul 17, 2012 3:02 pm

Re: Python a good choice?

Wed Nov 27, 2013 6:21 am

Python is an excellent choice. Nice clean language, lot's of libraries, lot's of users and support. It is the language that Eben and co. imagined to use as the introduction to programming and the reason Pi is called the Pi. (Not that Python is only for novice programmers, it's a sophisticated language.

The use of white space for block delimiting drives me nuts but that is something one can get used to.

If you are into C and really need the speed some where then building C/C++ modules that can be used from Python is not so hard.

WebPi
Posts: 262
Joined: Wed Apr 10, 2013 6:47 pm
Location: Birmingham, UK
Contact: Website

Re: Python a good choice?

Wed Nov 27, 2013 10:44 am

C programs certainly execute faster than Python programs, but when it comes to writing code, I find that I can get things done much faster with Python. Personally, I find it easier to write code in Python.
raspberrywebserver.com - Raspberry Pi tutorials
LinuxWebServers.net - Linux Web Server tutorials and examples
pyplate.com - Python web publishing tool

shuckle
Posts: 565
Joined: Sun Aug 26, 2012 11:49 am
Location: Finland

Re: Python a good choice?

Wed Nov 27, 2013 12:46 pm

I have actually been surprised how quickly python executes. It is usually been quite enough for applications, so c is needed less with todays machines.

User avatar
DrDominodog51
Posts: 79
Joined: Sun Sep 29, 2013 6:16 pm

Re: Python a good choice?

Wed Nov 27, 2013 11:36 pm

Go with C for the RC robot projects, but python for the games.
If you don't make it, it's your own damn vault. -Land of the Lost poster

Heater
Posts: 13277
Joined: Tue Jul 17, 2012 3:02 pm

Re: Python a good choice?

Thu Nov 28, 2013 6:31 am

DrDominodog51
Go with C for the RC robot projects, but python for the games.
Why?

PickyBiker
Posts: 68
Joined: Tue Nov 26, 2013 6:26 pm
Location: Texas

Re: Python a good choice?

Sun Dec 01, 2013 5:37 pm

Got my raspberry up and running on wired Ethernet. The USB WIFI dongle that came with the kit I bought can't be installed because the CD with the driver is unreadable on my laptop. The dongle is marked Stictech 802.11 n

Does anyone know where I can find the driver for that device online?

In the meantime, I will get started with the Python and IDLE programs.

User avatar
DougieLawson
Posts: 36098
Joined: Sun Jun 16, 2013 11:19 pm
Location: Basingstoke, UK
Contact: Website Twitter

Re: Python a good choice?

Sun Dec 01, 2013 5:53 pm

PickyBiler wrote:Does anyone know where I can find the driver for that device online?
Use lsusb, see what device it really is.

Also please start a new topic.
Adding a question about WiFi dongles to a thread about "Python a good choice?" is illogical and goes against forum etiquette.
Note: Having anything humorous in your signature is completely banned on this forum. Wear a tin-foil hat and you'll get a ban.

Any DMs sent on Twitter will be answered next month.

This is a doctor free zone.

User avatar
DrDominodog51
Posts: 79
Joined: Sun Sep 29, 2013 6:16 pm

Re: Python a good choice?

Sun Dec 01, 2013 5:58 pm

Heater wrote:DrDominodog51
Go with C for the RC robot projects, but python for the games.
Why?
C can be read by most electronics, and Python has a lot of documentation and resources. There is example Python games preinstalled on the Raspbian.

PickyBiker
Posts: 68
Joined: Tue Nov 26, 2013 6:26 pm
Location: Texas

Re: Python a good choice?

Sun Dec 01, 2013 10:18 pm

Okay, I will start a new topic for the dongle question.

User avatar
liz
Raspberry Pi Foundation Employee & Forum Moderator
Raspberry Pi Foundation Employee & Forum Moderator
Posts: 5201
Joined: Thu Jul 28, 2011 7:22 pm
Contact: Website

Re: Python a good choice?

Mon Dec 02, 2013 11:27 pm

I've just seen your first post: I've changed your name to PickyBiker, and your password should remain the same. Nothing worse than going for bike and getting bile. I feel for you. ;)
Director of Communications, Raspberry Pi

Return to “General discussion”