PDA

View Full Version : Python...



Warpster Buntu
July 28th, 2008, 12:14 AM
Hi. I just started out on Linux and was informed about the Python language. It seems interesting and newbie friendly, so I decided to download it.

So anyway, I opened the file, and am now in the section where I can either open or extract the file... neither way is helping.:(


So I'd like to know if there is some other option I am supposed to do and just can't see, or if I opened the program in the wrong way.

Kadrus
July 28th, 2008, 12:23 AM
Python is built in.You don't have to download it.
In terminal type python and you can start using.
Or you can use it by saving your file with the .py extension and in terminal running your program by doing
python filename.py


#!/usr/bin/python
print "Python Program"

save that file python.py
in terminal python python.py
and you will see python program

Warpster Buntu
July 28th, 2008, 12:36 AM
Thanks!

LaRoza
July 28th, 2008, 12:49 AM
You can check out the sticky (or my or pmasiar's wiki) to get more resources.

Kadrus
July 28th, 2008, 12:55 AM
..and the Python wiki (http://wiki.python.org/moin/)

elithrar
July 28th, 2008, 02:19 AM
I'd also suggest either the O'Reilly (http://oreilly.com/) or Apress (http://apress.com) books - more-so the O'Reilly ones.

"Learning Python" is probably the best place to start - though if you have zero programming knowledge, I'd suggest doing a little pre-reading first. The book does start from the basics, but it does assume you know the basic variables/constants/iteration/assignment concepts.

Warpster Buntu
July 28th, 2008, 02:55 AM
So, are online guides inefficient?

I had a somewhat harsh experience with C++, by buying a book and then... well, not enjoying it.

LaRoza
July 28th, 2008, 03:02 AM
So, are online guides inefficient?
No. For Python, they are all you really need, but some people like to have a book to follow.



I had a somewhat harsh experience with C++,
"somewhat harsh"? Good. Most of the time, it is very harsh.



by buying a book and then... well, not enjoying it.
Stick with the net first for Python.

Warpster Buntu
July 28th, 2008, 03:32 AM
Alright.

Thanks for the help.

Kadrus
July 28th, 2008, 09:16 AM
Books and Online tutorial can be a great combination.

samjh
July 28th, 2008, 09:41 AM
So, are online guides inefficient?

I had a somewhat harsh experience with C++, by buying a book and then... well, not enjoying it.

The official Python tutorial is one of the best there is:
http://docs.python.org/tut/tut.html

If you want a "book", then Think Python (http://www.greenteapress.com/thinkpython/) is worth looking at.

Kadrus
July 28th, 2008, 11:46 AM
Also doing problems,challenges,tasks will help you learn a language better,and enjoy it more.

nvteighen
July 28th, 2008, 03:25 PM
Also doing problems,challenges,tasks will help you learn a language better,and enjoy it more.

No, let me "disagree" ;) : Doing is probably the only way to learn a programming language. Tutorials should, IMO, be used to get the most basic concepts and functions, data types, etc... You'll learn the non-essential stuff by need.

jimi_hendrix
July 28th, 2008, 04:34 PM
http://www.developer.com/open/article.php/625901

this is a great series of tutorials for new programmers or programmers who are interested in python

u will need to find another site after the last tutorial because the author never finished the tutorial, but he explains things very simply

tamoneya
July 28th, 2008, 04:40 PM
i recommend the python challenge. You should first make your way through some tutorials so that you know the basics but then give the python challenge a try. That way you are thinking for yourself instead of just doing what the tutorial says.

http://www.pythonchallenge.com/

pmasiar
July 28th, 2008, 04:40 PM
Both "official" tutorial (at python.org) and "Thinking in Python" are books focused on experienced programmers (which does not seems to match your skill level). I wonder why so many people insist on recommending those same books, and I have to waste time to set it straight every time... :-( I guess this says a lot about general advice available on internet: you need to evaluate it carefully before use. Of course it is so much harder to do it if you are just a beginner... :-(

See sticky FAQ, and/or wiki in my sig, with selected links to (mostly free web) books specially for beginners (including training tasks).

nvteighen
July 28th, 2008, 05:01 PM
I've been also looking for some Python resources and agree with pmasiar the "Python Tutorial" is for experienced people... And it's also a bit confusing to me (I prefer "Dive into Python").

The Python official website has a list of tutorials for non-programmers that you may also consider:
http://wiki.python.org/moin/BeginnersGuide/NonProgrammers

Ah, not only write code, but also read other people's!