Python recommended readin ??

Code junkies hangout here

Moderators: ChrisThornett, LXF moderators

Python recommended readin ??

Postby Borat » Sat Sep 26, 2009 10:25 pm

I've decided I would like to learn Python. Could anyone recommend a book or web tutorial that would get me started (from absolute beginner).

The only programming I am familiar with is vintage 8 bit BASIC and Assembly Language. That's about it.
User avatar
Borat
 
Posts: 39
Joined: Thu Apr 10, 2008 10:54 pm
Location: County Antrim, Ireland

Postby Bazza » Sat Sep 26, 2009 11:26 pm

Hi Borat...

I started at the deep end with a high quality publication
from O`Reilly:-

"PYTHON IN A NUTSHELL"

(As recommended by LXF... ;)

I`m no coder but an engineer and although this book
is a quite advanced it `showed me the way`.

There are tutorials for the various Python versions, this
for version 2.6x:-

http://docs.python.org/tutorial/

HOWEVER, IF you decide on Python 3.x, (3000), then
this has major differences to the parallel running
versions of 2.x.

So decide first which fork you desire learn from first, then
apply your knowledge to the other fork(s) if you so desire...
73...

Bazza, G0LCU...

Team AMIGA...
User avatar
Bazza
LXF regular
 
Posts: 1476
Joined: Sat Mar 21, 2009 11:16 am
Location: Loughborough

Postby Borat » Sat Sep 26, 2009 11:37 pm

Cheers Bazza. I wasn't aware of a major fork. I'll maybe stick with pre-3.0
User avatar
Borat
 
Posts: 39
Joined: Thu Apr 10, 2008 10:54 pm
Location: County Antrim, Ireland

Postby Bazza » Sun Sep 27, 2009 8:25 am

Hi Borat...

> I wasn't aware of a major fork. I'll maybe stick with pre-3.0

Probably a wise choice as both are current and developed
in parallel to one another.

I use Python 1.4x to 2.0x for the classic AMIGA and various
versions to 2.6x for other platforms...

It is a little convoluted at times so DON`T think BASIC.
Once you get used to it it can be fun and highly productive...

Python 3K, (3000), 3.xx is similar in a lot of respects but
many functions have disappeared and some statement(s)
have been `reduced` to functions. "print" for example
is now a function, a real backwards step IMO...

Go get version 2.6x and have some fun... :)

It would be great to see some of your Python coding
experiments on here sometime...

CYA...
73...

Bazza, G0LCU...

Team AMIGA...
User avatar
Bazza
LXF regular
 
Posts: 1476
Joined: Sat Mar 21, 2009 11:16 am
Location: Loughborough

Postby nelz » Sun Sep 27, 2009 11:06 am

At some point, you're likely to have to learn 3.x, so if you know neither, it may save time in the long run to start with 3.0.
"Insanity: doing the same thing over and over again and expecting different results." (Albert Einstein)
User avatar
nelz
Site admin
 
Posts: 8523
Joined: Mon Apr 04, 2005 11:52 am
Location: Warrington, UK

Postby Saeblundr » Thu Feb 11, 2010 1:00 pm

Is there any real reason that 2.6 still seems to be the primary version in use everywhere i look? (default install in ubuntu 9.10, the docs.python.org seems to link directly to 2.6 related info, etc) even though 3.1 seems to be tagged as 'stable' now?

I played with some widgets about 4yrs ago that were coded in python, but am just getting back to learning python again, so am essentially in that "might as well save some time since i know neither" boat, if it holds true...
User avatar
Saeblundr
 
Posts: 3
Joined: Thu Feb 11, 2010 12:26 pm
Location: Australia

Postby nelz » Thu Feb 11, 2010 3:32 pm

The reason is compatibility. 2.x and 3.0 are quite different is some respects and trying to run a script written for 2.x with 3.x has a good chance of failure. Scripts written for Python 3 can specify that interpreter, but those written before 3.0 was available would break if 3 became the default.

If you want to work with other people's scripts, learn whichever version they have used but if it's just for yourself, you may as well start learning Python 3.
"Insanity: doing the same thing over and over again and expecting different results." (Albert Einstein)
User avatar
nelz
Site admin
 
Posts: 8523
Joined: Mon Apr 04, 2005 11:52 am
Location: Warrington, UK

Postby Saeblundr » Thu Feb 11, 2010 10:07 pm

*whips out his nearest package manager*

thanks.
User avatar
Saeblundr
 
Posts: 3
Joined: Thu Feb 11, 2010 12:26 pm
Location: Australia

Postby Dorimant » Wed Feb 17, 2010 10:06 pm

I found O'Reilly's "Learning Python" to be a very well written and easy to read book. They've just released a massively expanded second edition which also covers Python 3.0, so it's a decent place to start.

From there I found that once I had a project in mind, it being Python I could figure it out as I went.
Dorimant
 
Posts: 4
Joined: Mon Feb 15, 2010 8:40 pm


Return to Programming

Who is online

Users browsing this forum: Google [Bot] and 0 guests