You are not logged in.

#1 2009-02-02 06:25:05

MetalheadGautham
Member
From: Bangalore, India
Registered: 2008-07-27
Posts: 143
Website

Want to learn Python

I know C++ quite well, atleast as far as standard library is concerned. I am yet to learn any toolkit like ncurses or Qt.

I am thinking of moving to a better (read: more efficient) language, especially because I am sick of all memory management routines in C++ which I feel wastes my time quite often when I am trying to design end-user apps. I also want to make several scripts which mess around with commandline apps, but C++'s memory management again hurts me by making me work double.

I am trying to crack Project Euler problems, and without using GMP, I am unable to solve mathematical problems where the number have more than a certain number of digits.

A friend suggested Python, and I got inspired when I heard of all the different things, like forced indentions, single variable for number and float, etc. Later I read about Perl and Ruby but decided Python would be the best choice for me. An article by Eric S Raymond convinced me about using python.

So my question is, HOW do I go about learning python ? I want to use it chiefly in a linux environment, and I hope to write functional code as fast as possible and I want minimum learning time. And I also don't know how good GUI support for python is.


My main objectives are:

1. Make commandline apps
2. Solve Project Euler Problems
3. Use it to intergrate various commandline utilities
4. Some day learn PyQt and design graphical QT4 apps
5. Handle databases because I may learn MySQL in a few months

Can anybody with experience advice me as to how I proceed from now ?

Offline

#2 2009-02-02 06:58:44

Xyne
Administrator/PM
Registered: 2008-08-03
Posts: 6,963
Website

Re: Want to learn Python

It really depends on you and how you learn. I've found that I do quite well by starting with online tutorials and then progressing from there to personal projects that force me to learn more. The tutorial are good at getting you started but personal projects give you the motivation. It's like learning a natural language imo. You start with fixed phrases and basic grammar, but you really get into it when you're using it to express yourself and that's how you develop fluency and really progress. Of course you need to consult a reference now and then or read some up on unfamiliar syntax when you come across it, but at that point you're such resources more as tools than learning aids.

Take a look at these tutorials:
http://docs.python.org/tutorial/
http://www.rexx.com/~dkuhlman/python_10 … n_101.html

The Python Standard Library reference will help you no matter how you learn Python:
http://docs.python.org/library/

Last edited by Xyne (2009-02-02 07:00:43)


My Arch Linux StuffForum EtiquetteCommunity Ethos - Arch is not for everyone

Offline

#3 2009-02-02 07:00:04

chimeric
Member
From: Munich, Germany
Registered: 2007-10-07
Posts: 254
Website

Re: Want to learn Python

I might not be the experienced python programmer walking this planet (read "not at all"), but, I can recommend the following sites:

http://diveintopython.org/toc/index.html - I IMO very good introduction to python in general
http://www.pythonchallenge.com - a online python challenge, a good way to get into the "how to think python" thingy.
http://python.net/~goodger/projects/pyc … ndout.html - Code like a pythonista, essential Python idioms

GUI support is fairly good in python (half of the available apps for the Gnome Desktop are written in Python).

Last edited by chimeric (2009-02-02 07:00:37)

Offline

#4 2009-02-02 07:14:16

Allan
Pacman
From: Brisbane, AU
Registered: 2007-06-09
Posts: 11,383
Website

Re: Want to learn Python

I recently "learnt" python by diving head first into writing a script I needed.  I read this basic tutorial and then just went for it.  Given you can program in another language, you will have a fair idea about the sort of method/container/etc that you want to use so you can just google for the right name/syntax.  The Python tutorial is a great help too.

Offline

#5 2009-02-02 14:47:07

MetalheadGautham
Member
From: Bangalore, India
Registered: 2008-07-27
Posts: 143
Website

Re: Want to learn Python

Thanks.

Are there any other things I need to learn before learning python ? I noticed that python scripts are just bash shell scripts most of the time. How ?

Offline

#6 2009-02-02 14:54:27

Allan
Pacman
From: Brisbane, AU
Registered: 2007-06-09
Posts: 11,383
Website

Re: Want to learn Python

They are not bash scripts, they are python scripts...

Offline

#7 2009-02-02 15:27:12

Dead Code
Member
Registered: 2009-01-18
Posts: 227

Re: Want to learn Python

Offline

#8 2009-02-02 17:41:39

MetalheadGautham
Member
From: Bangalore, India
Registered: 2008-07-27
Posts: 143
Website

Re: Want to learn Python

Is there something easier ? I just want to grab a book, read it and start coding in a day or two.

Offline

#9 2009-02-02 18:10:49

anrxc
Member
From: Croatia
Registered: 2008-03-22
Posts: 834
Website

Re: Want to learn Python

Is there something easier ? I just want to grab a book, read it and start coding in a day or two.

Get a copy of "A Byte of Python" it will teach you py in an afternoon http://swaroopch.com/notes/Python 
Or since you already have programming experience you can jump straight to "Dive into Python" http://diveintopython.org/


You need to install an RTFM interface.

Offline

#10 2009-02-02 18:29:06

MetalheadGautham
Member
From: Bangalore, India
Registered: 2008-07-27
Posts: 143
Website

Re: Want to learn Python

Does anybody publish "Dive Into Python" ??? Its GFDL right ? So is it available for cheap ?

EDIT: is it true Symbian S60 runs python ? yikes

Last edited by MetalheadGautham (2009-02-02 18:30:28)

Offline

#11 2009-02-02 18:38:32

Zeist
Arch Linux f@h Team Member
Registered: 2008-07-04
Posts: 532

Re: Want to learn Python

MetalheadGautham wrote:

is it true Symbian S60 runs python ? yikes

Yes, you can run python on S60.


I haven't lost my mind; I have a tape back-up somewhere.
Twitter

Offline

#12 2009-02-02 19:02:58

bavardage
Member
Registered: 2008-02-17
Posts: 160

Re: Want to learn Python

"Does anybody publish "Dive Into Python" ???"

Yeah I have it in dead tree form - published by 'Apress' I think.

Offline

#13 2009-02-02 20:55:54

pinchyfingers
Member
From: Bristol, PA
Registered: 2008-11-04
Posts: 46
Website

Re: Want to learn Python

write a game with pygame!

Offline

Board footer

Powered by FluxBB