Slashdot is powered by your submissions, so send in your scoop

 



Forgot your password?
typodupeerror
×

Learning Python, 2nd Edition 322

Ursus Maximus writes "Eagerly awaited by many, this book reached bookstores just after Christmas, and updates the 1999 edition. Learning Python is O'Reilly's introduction to Python programming and at 591 pages, this is a major upgrade to the 366 page original. Furthermore, the Python language has undergone extensive improvements and additions in the last five years, and the new book does a good job of covering these changes."
Learning Python 2nd Edition
author Mark Lutz & David Ascher
pages 591
publisher O'Reilly & Associates, Inc.
rating 10
reviewer Ursus Maximus
ISBN 0596002815
summary An introduction to Python programming

Python is a dynamic, interpreted, object oriented language used for both scripting and systems programming. Python is known for being easy to learn and use, while also being powerful enough to be used for such projects as Zope and the Chandler project. Its growing popularity is also based on its reputation for fostering programmer productivity and program maintainability. One drawback sometime cited is its relatively slow execution speed compared to compiled languages such as C.

For myself, I have probably read too many books about Python, but that is because I am an amateur hacker who learns programming slowly, and I find that reading several books about the same topic, covering the subject matter from different angles, allows me to better absorb the material. For me, this was a good review of the core language and a welcome refresher course on the newer aspects introduced in versions 2.2 and 2.3. For anyone who is new to Python and wants to learn from the ground up, this book would be a great place to start.

Mark Lutz is an authority on Python and one if its leading teachers, with both Learning and O'Reilly's Programming Python to his credit, as well as the courses and seminars he teaches professionally. In updating the original version, which was already very good, Mark has polished the chapters on the core language to a nearly perfect level, while his co-author David Ascher has done the same on the more advanced aspects of the book. In addition, Mr Lutz has benefited from extensive feedback from students and readers, and his explanations therefore anticipate common misunderstandings. Each chapter is accompanied by a problem and exercise section and answers are included at the back of the book.

A major addition to the new edition is a chapter on "Advanced Function Topics," including list comprehensions, generators and iterators. Python is sometimes used with a functional programing style almost similar to Lisp, although to List purists that may sound like heresy. The recent versions of the language have significantly upgraded Python's support for the functional style. Functions cover three chapters in the 2nd edition instead of just one.

Another major change since the first edition is extended coverage of Modules, which now occupies four chapter instead of just one. Python modules are a high level package structure for code and data, and they help facilitate code reuse. Yet another addition is coverage of Python's "new style classes." Coverage of classes and object oriented programming has been greatly expanded and now includes five whole chapters and almost 100 pages. Coverage of exceptions now is expanded to three chapters.

If you have been considering learning Python, now would be a great time since this new book is the perfect introductory text. If you already know Python and have read the first edition of Learning Python or another introductory text, then this book may not be essential since the new language features are covered pretty well on the web in various places, and you might be better advised to read one of the other fine books on non-introductory aspects of Python. But this book is about as good an introduction to the language as you are likely to find. The book does not cover all of the Python libraries nor many other topics, but it does briefly touch on the major libraries, frameworks, gui toolkits, and community resources.

If you want to learn the core Python language quickly, this may be your best bet. Learning Python only covers the basics, but it is deep in information on what it does cover. Well written, understandable, and in a very logical arrangement, this book is densely packed with info.

I have often found myself returning to the original book, and the new book will now fill this role. It is deep in information, well written, and a joy to read. For an experienced programmer who is just learning Python, it may be possible to thoroughly learn everything about the core language in one reading of this book. For relative newbies, it will be an often-used resource.


To read more reviews of books about Python, visit the Python Learning Foundation. You can purchase the Learning Python, 2nd Ed. from bn.com. Slashdot welcomes readers' book reviews -- to see your own review here, read the book review guidelines, then visit the submission page.

This discussion has been archived. No new comments can be posted.

Learning Python, 2nd Edition

Comments Filter:
  • ...can be found here [python.org].

    I prefer Ruby [rubyforge.org], but there seem to be a lot of healthy discussions of various language features and ideas across the scripting language community. The "Python comparison page", for example, has a link to John Ousterhout's paper on why scripting languages are useful - even thought he wrote the paper about Tcl, it's just as applicable to Python or Ruby.
    • Total agreement.

      I've used python for several years, but only 2 weeks after stumbling across "Programming Ruby" (Available free at http://www.rubycentral.com/book/ [rubycentral.com]), I've switched all new development to Ruby. As a language, it just clicks for me. It's like the best of all possible worlds. It brings in the cleanliness of Python (without the whitespace issues, for those who dislike that), the hack value of Perl (tightly integated regex, etc), the OO of smalltalk/java (for those that like that kind of thing)
      • Actually, the python version would be:


        adict = {'key': 'val', 'key2': 'val2', 'key3': 3.14}
        for key in adict:
        print 'k -> ', adict[key]
      • by Freedom Bug ( 86180 ) on Tuesday January 20, 2004 @03:09PM (#8034489) Homepage
        Excellent example:

        1) I prefer the Python example. It's easier to read. And easier to write the first time. That's the reason Python is better than Ruby: when you write code, you get it right the first time more often. And that's such a huge advantage.

        Of course, you screwed up. (I assume you wanted to print the value of k rather than the letter k)

        2) You used a comprehension in Ruby but not in Python. And adict.items() would have been easier than adict.keys()

        To be more fair:

        adict = {'key':'val','key2':'val2','key3':3.14}
        [sys.stdout.write(k+'-> '+str(v)+'\n') for k,v in adict.items()]

        But if I was writing the code, I'd use a for loop rather than a comprehension.

        But for penis length competitions, we'll use the latter.

        Bryan
      • adict = {'key':'val','key2':'val2','key3':3.14}
        for k, v in adict.iteritems():
        print k, '->', v

        I think this is actually more readable than Ruby's "each" function which is a weaker alternative to iteration.
    • Here's a program I've written in ruby, just today, in about 2 hours.

      It generates a graphical waveform from the component harmonics, as well as graphing the first 10 harmonics.

      Source Code: http://tylere.com/waveform.rb.txt [tylere.com]

      Some Examples:

      Square Wave [tylere.com]
      A Phased Sine Wave [tylere.com]
      Triangular Wave [tylere.com]
      Sawtooth Wave [tylere.com]
    • Re: (Score:2, Informative)

      Comment removed based on user account deletion
  • Python? (Score:5, Informative)

    by sparklingfruit ( 736978 ) on Tuesday January 20, 2004 @01:49PM (#8033641)
    "Python has been an important part of Google since the beginning, and remains so as the system grows and evolves. Today dozens of Google engineers use Python, and we're looking for more people with skills in this language." said Peter Norvig, director of search quality at Google, Inc.

    Open source, expressive (very short code can achieve a lot), readable (very short expressive code is easily groked -- fewer bugs), no direct pointer manipulation (safe -- fewer bugs), integrates nicely with other languages, runs on a variety of platforms, very easy to learn.

    I, too would recommend learning python. It is a very good, language. Zeolotry is another thing though. Keep your mind open. Learn all the languages you can. This book, I can't comment, although I received it a week ago I haven't gotten around to reading it yet.
    • Re:Python? (Score:5, Interesting)

      by Just Some Guy ( 3352 ) <kirk+slashdot@strauser.com> on Tuesday January 20, 2004 @02:13PM (#8033900) Homepage Journal
      integrates nicely with other languages

      The importance and utility of this can't be overstated. Python absolutely rocks as a rapid development environment. I have not personally experienced a language that lets me go from concept to implementation nearly so quickly. Once an application is up and running, Python provides a great toolset for profiling your project and making it easy to replace performance-critical sections with the low-level language of your choice.

      Does your crypto application need a faster random generator? Replace parts of that module with C. The rest of your project still gets the benefits of a strongly typed, object-oriented language with a robust library of string manipulation, pattern matching, and GUI interfacing functions.

      It really is a project manager's dream come true. Python has replaced Perl as my language of choice for all new development.

    • Learn all the languages you can.

      No. Learn all the languages that will make you a better programmer. Learn languages that will expand your understanding of software engineering. Learn languages that will make you more productive. But for goodness' sake, don't waste your time learning every language you run across: the vast majority of languages are simply unproductive compared to a small handful of better, higher-quality languages.

      Languages can be compared based on objective criteria. You can honestl
    • Re:Python? (Score:2, Interesting)

      by gtrubetskoy ( 734033 ) *
      Python has been an important part of Google since the beginning

      What I'm kinda curious about is whether they use mod_python. From the looks of the URL's on Adsense and AdWords it seems likely that they are using the Publisher handler, but I've never heard any official (or even rumor) about it.

    • Re:Python? (Score:3, Informative)

      by Decaff ( 42676 )
      integrates nicely with other languages.

      One of the best examples of this is Jython - python implemented in 100% java. This allows the flexibility of a scripting language with the security and portability of Java.
  • 1st edition (Score:4, Informative)

    by JohnLi ( 85427 ) * on Tuesday January 20, 2004 @01:50PM (#8033648) Homepage
    I have the fist edition of this book. It has help me considerably, but it seemed as though I always had to use google to supplement it with code/examples. I guess I wanted to see more real world work in the book rather than what seemed to me to be generic theory explained via simplistic samples.

    Maybe its just me though.

    • by gabec ( 538140 ) on Tuesday January 20, 2004 @02:47PM (#8034301)
      The first edition helped me get my current job (y'know, the one I'm ignoring by reading slashdot *right now*). My "interview" was to create a fully-formed dynamic website in one week using only python. The idea being that if you can learn a whole new language in a week and get a real project off the ground then you're the kind of guy they're looking for.

      Anyway. I immediately ran off to the nearest bookstore and grabbed the first edition of the book. I read it once through and it--along with a lot of googling--helped me understand what I was doing, but once I had gone through it once I couldn't use it to recall the details of what I had been taught. If I wanted to look up something that I knew I had learned *from the book* I would have to look it up *on the web* (e.g. syntax or the required parameters of a function) because the index was useless. I never found anything I needed from that book once I did the initial once-through reading.

      Though let's not gloss over the fact that I obviously learned python fairly well from this book because I did get the job! So sure, if you need to learn the language, the first edition did the job, but you'd better buy a *real* python book while you're there at the bookstore because as soon as you were done with Learning... it was nothing more than a paperweight.

  • by mi ( 197448 ) <slashdot-2017q4@virtual-estates.net> on Tuesday January 20, 2004 @01:57PM (#8033724) Homepage Journal

    While TCL remains my personal favorite, Python is really good, except for the creating-your-own-extensions part. The Python's C API needs a lot of catching up to do to match the excellence of TCL's.

  • Python is amazing (Score:5, Informative)

    by arvindn ( 542080 ) on Tuesday January 20, 2004 @01:58PM (#8033729) Homepage Journal
    If you don't know python: learn it now!

    This is not a religious argument; I'm not advocating that python is the one language you should use or anything like that. In fact, not having an "ideology" is one of python's major strengths.

    If you're asking "why python [linuxjournal.com]", ESR has said it better than I ever could.

    I'm yet another of those who experienced extremely small turnaround times for python programs. It took me a week, working part time (I estimate about 30 hours) totally, to release 1.0 of gretools [ernet.in], starting from scratch. I had not written a single line of python code before that, mind you.

    Why python is great:

    Its not a religion. It doesn't force its style of thinking on you. Functional programming, excellent string manipulation tools, classes, inheritance, exceptions, polymorphism, operating system integration, they're all available. This is python's biggest advantage. Whichever background you're coming from, you can very quickly become effective at python.

    Incredibly compact code. This is largely a consequence of the previous point. Apart from that it is dynamically typed, and has lots of other cool features. Like doing away with braces for delimiting blocks. People who know nothing about the language flame it for using indentation, but I have never found it confusing, and it makes the code smaller far more readable.

    A user-friendly programming language! You aren't going to believe this until you've actually programmed in python. Its got this amazing property that if you can express a thought in constant space mentally, then you can code it in a constant number of lines, most of the time in a single line. In other words, the abstractions of the programming language match the "natural" abstractions of programmers very closely. After just a couple of days I got so used to this that I began to "predict" language features intuitively. At one point I just knew there had to be a language construct for something I was trying to do, and found that it was the reduce function.

    Simple syntax. Python manages to have all these features while retaining a very simple syntax, perhaps even simpler than C. This is a big plus, because it gets out of the way and Does What You Mean.

    Convinced? Get started now!

    • Its not a religion. It doesn't force its style of thinking on you.

      I agree with you overall, but Python does bow down to the temple of OOP. To me, a heavy OOP style of thinking feels very dated, even though Python has a very dynamic nature to its OOPness.
      • If you pretend that an object is actually a namespace (and squint a little bit) it's pretty easy to pretend that Python isn't object oriented.

        Of course, I don't know how "object oriented" is the same as "dated" in your head, so maybe it won't work for you.

    • I've tried several times to pick up Python - I have both Learning and Programming Python, have read through them, tried to do some stuff, but it's never clicked for me.

      Maybe I slept through too many CS classes and can't wrap my brain around OOP, maybe it's my failings as a coder, maybe I have a lot less free time nowadays than I used to, but I've been able to do a ton of useful work in Perl and haven't even been able to get started in Python.

      Maybe I'll give it an 8th try one of these days. I feel like I'
      • Note that you don't have to use OOP in Python - it just makes it easy if you want to. You're more than welcome to "def"ine a bunch of functions and call them directly.
        • Note that you don't have to use OOP in Python - it just makes it easy if you want to. You're more than welcome to "def"ine a bunch of functions and call them directly.

          Interesting point - most of the learning material is OOP-related, though, so I feel pretty lost trying to learn Python without knowing OOP. But that's good to know.
    • Re:Python is amazing (Score:5, Interesting)

      by The Bungi ( 221687 ) <thebungi@gmail.com> on Tuesday January 20, 2004 @02:36PM (#8034151) Homepage
      I love Python, though I primarily use it in Win32 environments (although it helps when I use BSD; shell glue is better done in Python, IMO). I've used it for close to four years now, and I suppose I consider myself relatively good at it. The best argument I've ever come up with as to why Python is better for web development than Perl: Zope/Plone vs. Bugzilla/SlashCode. I know they're different products, that's not the point. But just spend a few weeks examining both codebases. I can bet you good money that non-expert developers will understand a Python-based application faster than they will a Perl one.

      I guess Perl is just traditionally what you do these things with. It's not necessarily better. Perl also doesn't support Windows directly like Python does - if you want Perl in Win32 you pretty much have to go with ActiveState whereas Python.org has a Win32 specific distribution. Then again, it's difficult to compete against CPAN's sheer size.

      But anyway, it doesn't matter. We use what we want/like and it's cool that we have choices.

      However, over the past year or so I've also been looking at Ruby. Not to get into a religious argument (as you say) over which language is better, but if you like Python you should take a look at Ruby. If you're a Windows user there's an installer [sourceforge.net] available, which comes with a full book (in CHM format) that can get you running in no time if you already know Python. As Perl and Python, Ruby has extensions and so on. I do like the OO features in Ruby a bit better than Python.

      And least but not least, there's Lua. I wouldn't use Lua the same way I use Python, but Lua is a joy to embed, much more so than Python.

      Ahhh, language wars. Cheers =)

      • if you want Perl in Win32 you pretty much have to go with ActiveState whereas Python.org has a Win32 specific distribution.

        What is wrong with Activestate? Activestate is Perl's "Win32 specific distributition". Don't really see the difference.

        • Re:Python is amazing (Score:2, Interesting)

          by The Bungi ( 221687 )
          What is wrong with Activestate? Activestate is Perl's "Win32 specific distributition". Don't really see the difference.

          There's nothing wrong with ActiveState, except that they lag behind the main *nix releases and are generally slow to incorporate fixes. It also ships with a bunch of stuff you might not necessarily want. For example, the COM extensions. The fact that I'm running in Windows doesn't necessarily mean I want to use COM. It also takes way too long to install, considering what it is.

          The Win32

    • I picked it up a few years ago around the same time I was picking up Java, so I tend to compare it with Java. Initially I used them both for simple applications like XML processing and filtering.

      Generally speaking, I liked Python quite a bit, especially the identation delimeting code blocks thing quite a bit, especially the visual cleanness of the code (although this was slightly offset by the need to dereference member variables with "this->"). I found the module system a bit squirrely, especially th
  • I'm never convinced that adding more pages to a book is an "upgrade." If I could buy a book which was 1 page long, but which taught me damn well everything I needed to know about Python, I'd much, much rather buy that, purely from an opportunity cost perspective.

    If there's anything I hate, it's these big, thick, 1000-page (or 500-odd page) books which tell me how to use the Help system in Appendix 42.

    So, I'm always wary.

  • O'Reilly & Python (Score:3, Informative)

    by Petronius ( 515525 ) on Tuesday January 20, 2004 @02:02PM (#8033776)
    I don't think *all* the O'Reilly books are good but the Python books (I own several) are really excellent: they are written by people that have been involved with the language for a long time and that really *think* in Python and like the language. Glad to see Python is still doing well.
  • by Anonymous Coward on Tuesday January 20, 2004 @02:08PM (#8033843)
    I would recommend "Python In A Nutshell" as it cuts to the chase and doesn't teach you programming so much as giving you what you need to know in Python. If you can already program, the "Nutshell" book is pretty good, plus the author can always be found around the Python Newsgroup(s).
  • Free Python Books (Score:5, Informative)

    by iamdrscience ( 541136 ) on Tuesday January 20, 2004 @02:15PM (#8033929) Homepage
    Actually, if anyone is interested in learning Python and doesn't mind reading a book on their computer, there's a bunch of free ebooks available on the Python Documentation page (as well as a comprehensive list of books that are only printed). I've read a few of them, most of them are pretty good, in particular "How to think like a Computer Scientist" is a very good text for a less experienced programmer and Bruce Eckel's "Thinking in Python" is a nicely comprehensive coverage of Python (not unlike his "Thinking in Java" and "Thinking in C++" books).

    Even if you do mind reading books on your computer screen, most of these books (actually I think all of them) are also available as physical printed books as well.

    Thinking In Python [mindview.net] by Bruce Eckel
    An Introduction to Python [network-theory.co.uk] by Guido van Rossum, and Fred L. Drake, Jr. (Editor)
    How To Think Like a Computer Scientist: Learning with Python [greenteapress.com] by Allen Downey, Jeff Elkner and Chris Meyers
    Dive Into Python: Python for Experienced Programmers [diveintopython.org] by Mark Pilgrim
    Text Processing In Python [gnosis.cx] by David Mertz
    Python Language Reference Manual [network-theory.co.uk] by Guido van Rossum
  • python runtime (Score:4, Insightful)

    by chan518 ( 743628 ) on Tuesday January 20, 2004 @02:17PM (#8033946)
    One drawback sometime cited is its relatively slow execution speed compared to compiled languages such as C. this is the tradeoff between interpretation languages (python) and compiled languages (c, java). you get flexiablity in your code but you lose some speed in runtime. Well, most people use python to write scripts that are smaller than what they would write in C++ or java. you are not going to write half life 2 in python, right?...
    • this is the tradeoff between interpretation languages (python) and compiled languages (c, java)

      Oh well, don't drag Java into that. Especially concerning speed.

      BTW, I'm not sure about python, someone please straighten this out - I bet it's similar, but Perl isn't "interpreted language" as such. It is some kind of hybrid: From user point of view it's interpreted, the program is its own source code etc. But from the system's point of view, it's compiled, only compilation takes place right before launching t
      • Re:python runtime (Score:3, Informative)

        by Just Some Guy ( 3352 )
        Python works on a similar concept, except that the first time you execute (or import) "foo.py", the interpreter writes the compiled bytecode back out to the filesystem as "foo.pyc". If foo.py and foo.pyc both exist, and foo.py is not newer than foo.pyc, then the runtime environment loads foo.pyc instead of recompiling the human-readable version. If foo.py is newer than foo.pyc, then it recompiles foo.py, overwrites foo.pyc as if it never existed, and continues on.

        I love this setup. Your program will st

    • Re:python runtime (Score:2, Interesting)

      by kublai kahn ( 742219 )
      For medium- to large-scale scientific computing, I've found that a mixture of Python and C/C++ gets me the right combination of speed and flexibility. I write the main number-crunching pieces of my code as objects in C/C++, then use SWIG [swig.org] to generate the wrappers necessary to interface my objects with Python. The control structures are all in Python, which is where I really want the flexibility.
    • Re:python runtime (Score:3, Interesting)

      by fredrikj ( 629833 )
      If speed is critical, it might be a good idea to check out Psyco [sourceforge.net], which works sort of as a JIT compiler for Python. It's extremely simple to use in your code - just import the psyco module and make a function call to enable it. From what I've seen, Psyco typically makes Python code about three times faster. With "low-level" code, e.g. code that mostly performs arithmetic on ints and could be converted line-by-line to C code, the speedup is greater than that, easily ten times in realistic cases.
    • Re:python runtime (Score:4, Interesting)

      by ultrabot ( 200914 ) on Tuesday January 20, 2004 @02:59PM (#8034394)
      Well, most people use python to write scripts that are smaller than what they would write in C++ or java.

      Please don't confuse performance and size. Larger systems don't require bigger performance, performance is needed in tight inmost loops. And those you can implement in C while retaining the rest of the Python code.
    • actually... (Score:2, Interesting)

      actually an enormous game has been written in "stackless" python: EVE online. the reviews of EVE have been mediocre, but most have complimented the game's graphics. it's also an enormous world with all kinds of complex rules. according to the developers, it wouldn't have been possible without python.

      i think EVE proves that python is ready for big projects, even when performance is critical.
    • his is the tradeoff between interpretation languages (python) and compiled languages (c, java). you get flexiablity in your code but you lose some speed in runtime.

      No, it is the tradeoff between efficient and less efficient implementations of a language. There are languages that usually come with rather fast implementations while being very dynamic and flexible, like Common Lisp, which is usually compiled to native code. (Of course, there are also completely crappy and inflexible languages that are slow a

    • Maybe not Half Life, but "Severance: Blade of Darkness"'s logic is written in python.
  • Test of a language (Score:5, Insightful)

    by pclminion ( 145572 ) on Tuesday January 20, 2004 @02:25PM (#8034035)
    One of the things I initially judge a language by is how elegant it is to code the quicksort algorithm (yes, I'm aware Python has a built-in sort function -- that is not the point). Here's quicksort in Python:

    def quicksort(list):
    if len(list) > 1:
    pivot = list[0]
    left = [x for x in list if x < pivot]
    right = [x for x in list if x > pivot]
    pivot = [x for x in list if x == pivot]
    return quicksort(left) + pivot + quicksort(right)
    return list

    I'd say this speaks for itself. Enjoy.
    • Your quicksort traverses the list three times in those spiffy list comprehensions.
      Try:

      def quicksort(list):
      if len(list) > 1:
      pivot = list[0]
      left, middle, right = []. []. []
      for item in list:
      if item < pivot: left.append(item)
      if item == pivot: middle.append(item)
      if item > pivot: right.append(item)
      return quicksort(left) + middle + quicksort(right)
      else:
      return list

      The /pons asinorum/ is actually the list initialization. This is the newbie way:

      left = middle = rig
      • Your quicksort traverses the list three times in those spiffy list comprehensions.

        Yep. Another "failing" of this implementation (and yours, too) is that it doesn't do the sort in-place, so it uses n log n memory. The in-place sort implementation is what makes most really fast implementations so hairy and difficult to understand.

        • by rokicki ( 132380 )
          While it's not in-place, it most assuredly does not use n log n memory in the typical case (although for a bad initial input, it *can* use n^2 memory). This implementation, for random input, uses O(n) memory. The n^2 memory problem can be solved by choosing a random pivot element.
          • it most assuredly does not use n log n memory in the typical case

            Are you sure? In the typical case, the list is split evenly in half, with n/2 items in the left side, and n/2 items in the right. Therefore at recursion frame k there are n/2+n/2=n items in memory. Since the list will split log n times, there are log n recursion frames, which means n log n memory in use at the deepest level of recursion.

            Have I missed something subtle here?

            • Ahh, yes I have missed something. The left and right sides at recursion level k don't temporally co-exist.

              I guess that shows I do much more time analysis than space analysis...

  • by Anonymous Coward on Tuesday January 20, 2004 @02:26PM (#8034048)
    One drawback sometime cited is its relatively slow execution speed compared to compiled languages such as C.

    A mention of the Psyco [sourceforge.net] Python runtime compiler is in order. It's simple to use as well - all you do is put this at the top of your entry script:
    import psyco
    psyco.full()
    All routines called are then compiled from bytecode on-the-fly into native x86 code. It's not quite as fast as C - but with Psyco you can easily get close, especially if you design your algorithms properly.

    While I'm here, these are the Python packages that I find essential once I have the base installation [python.org] (which includes the IDLE IDE). I've used these packages under Windows, but most work on Linux as well:
    • Win32All [python.net] - Windows 32 extensions & the Pythonwin IDE
    • wxPython [wxpython.org] - A GUI library based on wxWindows. Far superior to the included TCL/TK libraries.
    • Psyco [sourceforge.net] - Runtime compiler, mentioned above
    • Py2Exe [python.net] - Takes in Python scripts, spits out executables (note: use in conjunction with Psyco for best effect)
    • Boa Constructor [sourceforge.net] - A wxWindows GUI design tool. It's a full blown IDE as well, but I have only used it to design GUI layouts, I code in Pythonwin.
  • by h4rm0ny ( 722443 ) * on Tuesday January 20, 2004 @02:32PM (#8034100) Journal

    You need a book to learn Python?!??!!? My god, I'm an old C++ programmer, Python is like a gift from a god!

    You just have to bang your head against the keyboard a couple of times and I bet you it compiles! ;) Never used to be like that when I learnt to program.

  • Is a book review that wasn't for lavae [catb.org].

    It's like going to the local bookstore and hoping for something more to buy than Learn VB in 24 Hours.

  • by shaka999 ( 335100 ) on Tuesday January 20, 2004 @02:44PM (#8034252)
    I'm a long time perl programmer. Recently I did some research into Python. It really does look to be a more elegant language and enforce some structure that is needed in Perl.

    That said I can't justify the switch. There are just too many good modules available in Perl (esp for the engineering work I do). When python has the bredth of packages that Perl does, and when they have a nicely organized way to access said modules, I'll be happy to switch.
  • My review (Score:2, Insightful)

    by tarzan353 ( 246515 )
    It gives a thorough description of how to use Python; which is indeed easy to learn if you already know another language. But when the authors say that not having to compile Python programs means that development time is speeded up, perhaps they are overstating. For most programmers who use compiled languages like C or C++, the biggest time is taken up in finding a method that solves a problem, coding it and subsequent debugging. These days, compilers on recent hardware are fast enough that link/compile tim
    • But if you are currently using C or C++, with maybe X for graphics, or Java, then I suggest you stay with those.

      Perhaps they might want a more Agile language, instead of clunky C++/Java they are using at the moment? Going with Python, they can retain the scalability while developing code/unit tests/prototypes much faster. Being primarily a C++ programmer, getting to program in Python is extremely liberating. It feels like being able to talk fluently again, instead of measuring every word carefully and th
    • These days, compilers on recent hardware are fast enough that link/compile times are simply not a bottleneck to development productivity.

      Apparently you've never worked on a project with a "core" header file that gets #include'd by about 5000 source modules. Make one little diddly change to that header and you have to recompile 5000 files.

      It can sure as hell be a massive waste of time. Now, whether or not it's good practice to structure your program in such a way that everything depends on a single head

    • Re:My review (Score:4, Informative)

      by Tikiman ( 468059 ) on Tuesday January 20, 2004 @03:33PM (#8034744)
      Perl is powerful, but its code looks like assembler

      Important correction - Perl can look like assembler... but it doesn't have to. A Perl script can be as clean and readable as you want it to be. Ugly code is a result of lazy programmers, not the language itself.

The use of money is all the advantage there is to having money. -- B. Franklin

Working...