PDA

View Full Version : Learning Python



GuitarHero
August 11th, 2006, 10:28 PM
How difficult is the Python language? What background should I have? The only programming I have done is web programming(html and php). I've wanted to try something else out for a while now.

Tinuz
August 11th, 2006, 10:32 PM
It's really easy. There is no entry requirment for it as far as I can see. Seeing your previous experience, I guess you'll get bored with it quite soon if you're a bit like me. :p
If that's the case, try Perl or Ruby.

ComplexNumber
August 11th, 2006, 10:33 PM
How difficult is the Python language? What background should I have? The only programming I have done is web programming(html and php). I've wanted to try something else out for a while now.
-very easy - one of the easiest languages to use. it also teaches good programming. you'll probably have someone criticise it for its use of white spaces instead of the ubiquitous curly brackets that are used in C, java, and about 10 billion other languages.
-background? all you need is a desire to learn.

python is quite a widely used language, especially within the linux community. its not as whidespread as the likes of vb, java, C, and C++ though.

go for it! :)

GuitarHero
August 12th, 2006, 01:05 AM
Well is it still useful? What can I use it for?

ComplexNumber
August 12th, 2006, 01:24 AM
Well is it still useful? What can I use it for?
yes of course its still useful! ;). why shouldn't it be?
you can use it for virtually everything, but bear in mind that each language tends to have its own forte where it does the job better than other languages. as a general purpose language, python is very good. different languages have different 'features', so each language has its own strengths and weaknesses. for example, C/C++ are compiled languages and have many low level features, so they are good where speed is necessary or the programmer needs to program system applications that access deep levels within the computer hardware, for example. C/C++ is also a pain todevelop because its easy to screw things up.
lisp is good for artificial intelligence because of its structure.
perl is good for string handling etc.
java is good(?) for writing cross platform applications.

here are some links for python:
http://python.miscellaneousmirror.org/doc/Newbies.html
http://en.wikipedia.org/wiki/Python_programming_language
http://www.python.org/
http://www.pygtk.org/pygtk2tutorial/
http://diveintopython.org/
http://python.fyxm.net/doc/Newbies.html
http://www.sthurlow.com/python/

Polygon
August 12th, 2006, 01:29 AM
i also found this thread in the "related threads" thing on the bottom, maybe has more links that will help you.

http://www.ubuntuforums.org/showthread.php?t=49841

GuitarHero
August 12th, 2006, 01:47 AM
Thanks im reading over those now. Looks fairly easy and straightforward. What program is best for coding/compiling python programs?

ComplexNumber
August 12th, 2006, 01:54 AM
Thanks im reading over those now. Looks fairly easy and straightforward. What program is best for coding/compiling python programs?
most ordinary editors such a gedit, kate, etc. thats all you need. there is also dedicated python editors such as eric(qt/kde) and PyPe(gnome/gtk)

GuitarHero
August 12th, 2006, 02:10 AM
Oh so those scripts with no extension are python scripts? Never knew that, should have guessed.

ComplexNumber
August 12th, 2006, 02:23 AM
Oh so those scripts with no extension are python scripts?
their extension is 'py'.

futz
August 12th, 2006, 02:24 AM
Some more Python related links:

http://www.faqts.com/knowledge_base/index.phtml/fid/480
http://home.cfl.rr.com/genecash/index.html
http://www.secnetix.de/~olli/Python/doclinks.hawk
http://www.secnetix.de/~olli/Python/list_comprehensions.hawk
http://copsewood.net/tic/python/notes2.html
http://py.vaults.ca/apyllo.py
http://www2.linuxjournal.com/article/3946
http://www.linuxfocus.org/English/July2000/article160.shtml
https://www.redhat.com/magazine/012oct05/features/python/
http://yourmachines.org/tutorials/mgpy.html
http://www.awaretek.com/tutorials.html

futz
August 12th, 2006, 02:28 AM
Thanks im reading over those now. Looks fairly easy and straightforward. What program is best for coding/compiling python programs?
Like the other guy said, any text editor works fine. I use Gedit. It knows python and does syntax highlighting.

Python doesn't get compiled. It's an interpreted language, or scripting language.

If you want to do graphics and maybe even write some gamey type stuff, get Pygame. Search Synaptic for python2.4-pygame to install it. There are lots of tutorials out there and the Pygame site is http://www.pygame.org

Have fun!