Best Beginner's Guide To Python?

B

Ben Finney

I've recentlty been getting into programming. I was wondering what
language to learn first and after asking around I decided on Python.

Welcome. It sounds like you were well advised.
I'm about half way through "Non-Programmers Tutorial For Python" By
Josh Cogliati (http://www.honors.montana.edu/~jjc/easytut/easytut/)
and I'm wondering where I should go after this. Any help is
appreciated, thanks.

<http://www.python.org/topics/learn/>

Most especially, Python's own tutorial:

<http://www.python.org/doc/current/tut/>
 
T

The Tao of Spike

I've recentlty been getting into programming. I was wondering what
language to learn first and after asking around I decided on Python.
I'm about half way through "Non-Programmers Tutorial For Python" By
Josh Cogliati (http://www.honors.montana.edu/~jjc/easytut/easytut/)
and I'm wondering where I should go after this. Any help is
appreciated, thanks.
 
S

sean

Not exactly sure what you mean by where to go after that.

Do you mean what language to tackle next? Or what book to read next?

If you are looking for a good book... look no further than the Oreilly
series of books on Python. Also, I found the python book by deitel to be a
pretty good beginning read. As previously mentioned... the python tutorial
on python.org is a great thing to check out as well.

Python is a great language that I have picked up very quickly and have grown
to love it. However it is not like any other language that I have seen in
two major ways.

1) Their are no semi-colons at the end of lines --- nice if you haven't
done any programming, but a little frustrating when you put one on almost
automatically when writing code.

2) No use of curly braces {} to group code. This is by far my biggest
problem with python. I have, on more than one occasion, needed to put some
code in a loop for testing purposes. In java, c, perl, etc... you write
your looping statement and throw a couple of braces around the code you want
it to use. In python, you write your looping statement... but then have to
indent each line that will be looping. After testing, all indents must then
be deleted.

I can deal without the semi-colons, but would love to see implementation of
curly braces for code grouping.
 
H

Harry George

[snip]
2) No use of curly braces {} to group code. This is by far my biggest
problem with python. I have, on more than one occasion, needed to put some
code in a loop for testing purposes. In java, c, perl, etc... you write
your looping statement and throw a couple of braces around the code you want
it to use. In python, you write your looping statement... but then have to
indent each line that will be looping. After testing, all indents must then
be deleted.

When you say you must indent every line and then undent every
line....are you using an editor that knows how to do a block
shift-right and shift-left? In emacs, you just grab the code with a
sweep of the mouse and hit "C-c >" or "C-c <". I haven't timed it,
but it would be in the neighborhood of (and maybe faster) than
inserting and deleting curly braces.

[snip]
 
E

electron

The said:
I've recentlty been getting into programming. I was wondering what
language to learn first and after asking around I decided on Python.
I'm about half way through "Non-Programmers Tutorial For Python" By
Josh Cogliati (http://www.honors.montana.edu/~jjc/easytut/easytut/)
and I'm wondering where I should go after this. Any help is
appreciated, thanks.

The latest (2nd) edition of Oreilly's "Learning Python",
ISBN 0596002815, by Mark Lutz and David Ascher is absolutely
outstanding and much improved over the 1st edition which was also
good. I own the 1st edition and currently have the 2nd edition
checked out from my local library. The latter is so good that I
intend to buy it ASAP.

Regards
 
N

Nuff Said

I've recentlty been getting into programming. I was wondering what
language to learn first and after asking around I decided on Python.
I'm about half way through "Non-Programmers Tutorial For Python" By
Josh Cogliati (http://www.honors.montana.edu/~jjc/easytut/easytut/)
and I'm wondering where I should go after this. Any help is
appreciated, thanks.

Next, I would recommend to read the official Python tutorial at the
Python website (http://www.python.org/doc/current/tut/). After that,
I would not recommend to spend too much money on 'tutorial style' books,
but to get a decent Python companion (e.g. Python - Essential Reference
by David M. Beazley) which you can use for the next years.

(There is so much Python example code on the web that it is not really
necessary to buy a book for that IMHO.)

HTH / Nuff


BTW: Will there be a 3rd edition of David Beazley's book in the
near future? Any rumors?
 
D

Dirk Hagemann

The said:
I've recentlty been getting into programming. I was wondering what
language to learn first and after asking around I decided on Python.
I'm about half way through "Non-Programmers Tutorial For Python" By
Josh Cogliati (http://www.honors.montana.edu/~jjc/easytut/easytut/)
and I'm wondering where I should go after this. Any help is
appreciated, thanks.
I started to lern programming in python simply by PROGRAMMING IN PYTHON.
I had some things I wanted to be done by a script and I just started to
write my script. When I had any difficulties I tried to find the
solution in books or somewhere in the internet.
May be you should simply start to write more complex scripts or think
about which special direction you are interested in. Websites?
Networking (Windows or Linux or..?)? Something else?

Dirk
 
J

Josiah Carlson

When you say you must indent every line and then undent every
line....are you using an editor that knows how to do a block
shift-right and shift-left? In emacs, you just grab the code with a
sweep of the mouse and hit "C-c >" or "C-c <". I haven't timed it,
but it would be in the neighborhood of (and maybe faster) than
inserting and deleting curly braces.

I've discovered one of the non-minor differences between an editor that
doesn't care about the user and one that does, is the ability to indent
and dedent blocks of code. If the parent doesn't have that ability in
their editor, then the developer honestly doesn't care about the users
of the editor.

- Josiah
 
W

Wayne Folta

When you say you must indent every line and then undent every
line....are you using an editor that knows how to do a block
shift-right and shift-left? In emacs, you just grab the code with a

Agreed. Python is more dependent on a reasonable editor than other
languages, if only for this feature. Depending on the OS you're using,
you may already have such editors. For example, vi (or better vim) is
available on all UNIX-based systems. Most IDEs should support block
indent/undent as well.

Another widely-used editor in MacOS X (if that's what you're using) is
BBEdit which also supports this.

If nothing else, a reasonable editor also supports syntax coloring
which I used to scoff at but now find quite useful.

With something like BBEdit, you simply select the lines in question and
press CMD-] to indent and CMD-[ to undent. It's faster and more
reliable than killing/adding braces at both ends.

I also agree with the 2nd ed Learning Python recommendations. I've
programmed for over 20 years, so it might be a little hard to tell what
a total novice needs, but it is well-written and looks useful for all
levels.
 
N

Nick Vargish

sean said:
2) No use of curly braces {} to group code. This is by far my
biggest problem with python. I have, on more than one occasion,
needed to put some code in a loop for testing purposes. In java,
c, perl, etc... you write your looping statement and throw a
couple of braces around the code you want it to use. In python,
you write your looping statement... but then have to indent each
line that will be looping. After testing, all indents must then
be deleted.

This is, of course, a feature of Python.

Working with other peoples' C code, I've seen many examples where a
block of code was turned into a loop for "testing", and since it
worked better, the loop was never removed. Of course, the block never
gets indented. Hilarity ensues.

Nick
 
K

Kurt B. Kaiser

I've recentlty been getting into programming. I was wondering what
language to learn first and after asking around I decided on Python.
I'm about half way through "Non-Programmers Tutorial For Python" By
Josh Cogliati (http://www.honors.montana.edu/~jjc/easytut/easytut/)
and I'm wondering where I should go after this. Any help is
appreciated, thanks.

There's more to programming than learning a language:

How to Think Like a Computer Scientist [in Python]

http://www.ibiblio.org/obp/thinkCSpy/

The Python Tutorial is good:

http://www.python.org/doc/current/tut/tut.html

I have many Python books. Most are redundant. The one I keep
coming back to (because it's thorough and concise) is

Python Essential Reference
David M. Beazley
New Riders

but you may like

Python in a Nutshell
Alex Martelli
O'Reilly

better because it's more detailed, covers Tkinter and XML, and is
updated to Python 2.2. I use both.

Those two are more than just reference books, because they include
example code for each topic.

For an extended (1200 page) introduction, _Programming Python_ is
great, as others have recommended.

I would stay away from the Deitel book. The code isn't Pythonic.

Python is unusual in that its learning curve is a series of
plateaus rather than a continuous climb. You can do a lot
once you get to that first plateau, which doesn't take long.
(The introductory tutorial in Beazley's book is eleven pages.)

Read other people's code. Experiment. Code up some project. Repeat.

Python was a good choice.
 
D

Dang Griffith

....
If you are looking for a good book... look no further than the Oreilly
series of books on Python. Also, I found the python book by deitel to be a
pretty good beginning read. As previously mentioned... the python tutorial
on python.org is a great thing to check out as well.
....
Really? I've seen the Dietel C++ and Java books, and did not find
them very good. They weigh a ton and have a lot of information, but
the index wasn't very good for "random access". Do you (or does
anyone else) know if the Python book is better than the C++/Java
books?

If I've already gone through the OReilly books (except the cookbook)
and Dr Mertz' Text Processing, is there much/anything to be gained
from the Dietel book?
Thanks,
--dang
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,755
Messages
2,569,537
Members
45,020
Latest member
GenesisGai

Latest Threads

Top