would reading a book from a year or two ago cause me to miss much?
thanks!
> hi all. are there any recommendations for an intro book to python that
> is up-to-date for the latest version?
I do not know how much up-to-date they are but I have to suggest you these
books:
- Learning Python
By Mark Lutz and David Ascher
published by O'Reilly
Most likely the best introductory book on Python
- Python Cookbook
By Alex Martelli and David Ascher
published by O'Reilly
By far the most useful book on Python after your first week of real use of
this language
Also, the fundamental
- Programming Python (the 2nd edition ONLY)
By Mark Lutz
published by O'Reilly
Is very useful for understanding the most inner details of Python
> would reading a book from a year or two ago cause me to miss much?
No. Python did not changed too much since rel. 1.5. You can still use a book
published in 2001 as a introductory book (as I do). The changes are
exhaustively described both in the official documentation and in the very
fine "what's new in..." articles written by Andrew Kuchlin for every new
release (see www.python.org).
CU
-----------------------------------
Alessandro Bottoni
Adriaan
>>>Alessandro Bottoni <alessandr...@infinito.it> 08/18/05 9:02 am >>>
The first 2 weeks is free after that it's $20/month. You can check out
10 books at a time and you have to keep them for a month. You can
download chapters, print pages, and search all the books in the library,
as well as search across books you've checked out.
It's a great way to get access to a broad range of technical books.
One thing to be careful of. As the old books are there too it's possible
to grab a first version when you might want a second or third version.
Always list by date and make sure you're looking at the new stuff.
Cheers,
Paul
i also have python cookbook, and foundations of python network
programming - i haven't really had a chance to look at these in detail
yet but both of these look good
It depends on what kind of books you like, and of course on your
previous experience.
I think "Python: Visual QuickStart Guide" by Chris Fehily is a rather
nice beginner's book, even if it's from 2001. It's also pretty cheap.
I don't have it at hand now, but I suspect that it doesn't cover new
style classes, generators, or list (or generator) comprehensions, but
it's still a good intro.
If you like a high density book, Alex Martelli's "Python in a Nutshell"
is great, and if you like to see a bunch of recipes, "Python Cookbook,
2nd ed" is good. The cookbook recipes are also on the net, but the book
does add value to them.
> would reading a book from a year or two ago cause me to miss much?
Probably not. Most recent changes to Python, such as decorators, are
things that beginners might want to leave until later... New standard
modules, such as datetime, are covered in the standard library manual.
Just one more quick question: I'm basically learning programming for
fun, and I'm concentrating on C# right now. Python seems interesting,
but I was wondering if I should even bother. Would it supplement C# in
any way, or can C# do everything Python can?
Thanks,
John
http://naeblis.cx/rtomayko/2004/12/15/the-static-method-thing
http://dirtsimple.org/2004/12/java-is-not-python-either.html
http://ischenko.blogspot.com/2005/02/java-may-not-be-that-bad-after-all.html
and maybe poke around ehre to learn about language design, how people
define typing, etc
http://www.artima.com/
http://www.ruby-doc.org/RubyEyeForThePythonGuy.html
http://onestepback.org/index.cgi/Tech/Ruby/PythonAndRuby.rdoc
http://www.approximity.com/ruby/Comparison_rb_st_m_java.html
http://reflectivesurface.com/weblog/2004/12/19/why-rails
http://martinfowler.com/bliki/CollectionClosureMethod.html
Also, Hal Fulton's "Ruby Way" book has a good "Python vs. ruby syntax"
appendix, if it's still in print
C# and Python are both Turing-complete (net of limitations to finite
amounts of storage, in the real world), so of course "they can do"
exactly the same things as each other in some pretty strong sense -- so
can machine language, Fortran, ...
Exactly because of this, this is hardly ever a sensible question to
ask. It clearly can be more _convenient and practical_ to "do some
thing" in C# than machine language, because C# is a higher-level
language than machine language, which increases your productivity (this
applies to most tasks, but for a few things, such as some
interrupt-response routines in embedded systems, machine language can
instead be vastly more practical and productive).
Similarly, Python is a higher-level language than C#, which further
increases your productivity (and again this applies to most tasks, but
for a few lower-level things C# may in fact be more practical and
productive).
Besides considerations connected to the language themselves, similar
issues (pushing the same way) apply to their implementations -- Python
vs C# as well as C# vs machine language. As far as I know, to deploy
C# applications you need a dotNet runtime (or perhaps a Mono runtime,
if you find it robust enough for your purposes); with machine language
you'd be restricted to a particular family of CPUs (or emulators
thereof, such as VirtualPC to emulate intel CPUs under MacOSX with
PowerPC CPUs). Similarly, with Python you can deploy on the same
runtimes as you can with C# (using the IronPython implementation, which
compiles Python to Microsoft CLR intermediate-code) -- but
alternatively you can deploy to JVMs (with the Jython implementation),
to a variety of architectures and OSs using a Python-dedicated
runtime/VM (with the classic, CPython implementation), to some Nokia
cellphones (Series 60 ones, I believe) using the Python runtime which
Nokia has developed and released, one day to the Parrot VM, etc, etc...
in practice, therefore, Python pervades more niches than C#, and thus
offers more practical deployment options, just like C# is more
pervasive and deployable than machine language. However, I believe the
language-level (and therefore programmer-productivity) issue will be
even more important in most cases.
Alex
I presume by "too much" you mean "very much" rather than "inordinately"
or "excessively".
IMHO the addition of [list off the top of my head] string methods,
Unicode, new-style classes, generators, list comprehensions, etc etc
since 1.5 would indicate that pointing a newbie at an old book would not
be such a good idea.
>Also, are Python and Ruby similar languages? Which would be better to learn?
>
>
<IMHO>
Knowing both, they are very similar. Python seems to be more mature and
has better support. Threading is easier in Ruby, while Python is more
intuitive across the board.
I really like both, but it seems that you really can do more, easily,
with Python. Very recently I was all about Ruby, then I rediscovered
Python. It's really quite brilliant.
</IMHO>
>Also, are Python and Ruby similar languages? Which would be better to learn?
>
>
Well, well - and nobody mentioned an online tutorial (if I'm not wrong).
What a shame :-).
If you feel new to all this, then first go to this page:
http://www.python.org/doc/2.4.1/
then locate the Tutorial and give it a try. Maybe it is not very complete
and leaves some subjects in the dark, but after reading it you should
improve your ability to choose the right printed book from your local
store (or wherever you look for new books).
After reading the Tutorial, I would start a decent text editor, and
pointed it to my local Python install files, like
/usr/local/lib/python2.4/ and checked if any *.py file made any sense to
me. This would give me some hints about how much I need to learn and on
what level.
Regards,
Tomasz Rola
- --
** A C programmer asked whether computer had Buddha's nature. **
** As the answer, master did "rm -rif" on the programmer's home **
** directory. And then the C programmer became enlightened... **
** **
** Tomasz Rola mailto:tomas...@bigfoot.com **
-----BEGIN PGP SIGNATURE-----
Version: PGPfreeware 5.0i for non-commercial use
Charset: noconv
iQA/AwUBQwUtaxETUsyL9vbiEQIoEwCfZQm9IHu5wUFrdu7vUqbDAi6APkQAoOOc
b7v4+ZFWEyh9nnOfDbJ/BbX0
=Fs7D
-----END PGP SIGNATURE-----
Python is an excellent tool in any programmers toolbox. No one language
is ideal for every task, but Python very often provides a more rapid
solution to your problem than other languages do. Particularly for small
problems. It's common to use Python to solve a problem in 3 minutes that
would take 10 or 30 minutes to solve in some other way. It's also great
for building something in 3 man-months instead of 3 man-years, but you
need more time to verify that claim! ;^)
If you need a GUI for some simple task, it might often be more
convenient to use something like Excel or VB. I haven't used MS's C#
environment, so I can't compare with that, but it's often just a bad
habit to build captive user interfaces for every task we want to solve.
It certainly makes it much more difficult to make modular and reusable
software. Most Python programs I write work both as standalone programs
and as modules that other programs can use. This versatility basically
costs one line of code.
If I was a professional C# developer, I'm pretty sure I'd use Python
quite a bit. As a professional C++ programmer and database developer,
I've used Python to manage tests, find and repair broken data in
mission critical production systems, automate database administration
tasks such as upgrading multiple databases, extracting, converting and
copying data, create database reports, post-process generated source
code, analyze large software systems and databases etc etc.
Actually, during seven years as an independent consultant, I found good
use for Python with every client.
That one is my first choice. FYI, it is based on Python 2.2, but discusses
most (all?) interesting 2.3 features too. That has been very acceptable to
me.
I wouldn't buy a book that didn't discuss 'yield' or list comprehensions.
> Probably not. Most recent changes to Python, such as decorators, are
> things that beginners might want to leave until later... New standard
> modules, such as datetime, are covered in the standard library manual.
Exactly.
/Jorgen
--
// Jorgen Grahn <jgrahn@ Ph'nglui mglw'nafh Cthulhu
\X/ algonet.se> R'lyeh wgah'nagl fhtagn!
Same here. Python is also a language that organizations and bosses tend to,
increasingly, accept as a "real language" in which "real programs" can be
written. Sometimes perceptions matter.
One more positive thing about Python, as compared to C#, is that it isn't
tied to a specific manufacturer or environment. That may not matter
short-term, but in the long run, it may be crucial for the program
-- and for the programmer.
Alex
Alex
regards
Steve
--
Steve Holden +44 150 684 7255 +1 800 494 3119
Holden Web LLC http://www.holdenweb.com/