By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
443,768 Members | 2,004 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 443,768 IT Pros & Developers. It's quick & easy.

Best Beginner's Guide To Python?

P: n/a
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.
Jul 18 '05 #1
Share this Question
Share on Google+
12 Replies


P: n/a
On 5 Feb 2004 21:48:20 -0800, The Tao of Spike wrote:
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/>

--
\ "The sun never sets on the British Empire. But it rises every |
`\ morning. The sky must get awfully crowded." -- Steven Wright |
_o__) |
Ben Finney <http://bignose.squidly.org/>
Jul 18 '05 #2

P: n/a
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.
"The Tao of Spike" <du*********@aol.com> wrote in message
news:3b**************************@posting.google.c om...
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.

Jul 18 '05 #3

P: n/a
The Tao of Spike wrote:
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
Jul 18 '05 #4

P: n/a
On Thu, 05 Feb 2004 21:48:20 -0800, The Tao of Spike wrote:
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?

Jul 18 '05 #5

P: n/a
The Tao of Spike wrote:
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
Jul 18 '05 #6

P: n/a
"sean" <se********@cox.net> writes:

[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]
--
ha************@boeing.com
6-6M31 Knowledge Management
Phone: (425) 342-5601
Jul 18 '05 #7

P: n/a
> 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
Jul 18 '05 #8

P: n/a
"sean" <se********@cox.net> writes:
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

--
# sigmask || 0.2 || 20030107 || public domain || feed this to a python
print reduce(lambda x,y:x+chr(ord(y)-1),' Ojdl!Wbshjti!=obwAcboefstobudi/psh?')
Jul 18 '05 #9

P: n/a
du*********@aol.com (The Tao of Spike) writes:
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.

--
KBK
Jul 18 '05 #10

P: n/a
> 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.
Jul 18 '05 #11

P: n/a
On Thu, 5 Feb 2004 23:25:36 -0800, "sean" <se********@cox.net> wrote:

....
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
Jul 18 '05 #13

This discussion thread is closed

Replies have been disabled for this discussion.