Hot Best Seller

Python Cookbook

Availability: Ready to download

If you need help writing programs in Python 3, or want to update older Python 2 code, this book is just the ticket. Packed with practical recipes written and tested with Python 3.3, this unique cookbook is for experienced Python programmers who want to focus on modern tools and idioms. Inside, you’ll find complete recipes for more than a dozen topics, covering the core Pyth If you need help writing programs in Python 3, or want to update older Python 2 code, this book is just the ticket. Packed with practical recipes written and tested with Python 3.3, this unique cookbook is for experienced Python programmers who want to focus on modern tools and idioms. Inside, you’ll find complete recipes for more than a dozen topics, covering the core Python language as well as tasks common to a wide variety of application domains. Each recipe contains code samples you can use in your projects right away, along with a discussion about how and why the solution works. Topics include: Data Structures and Algorithms Strings and Text Numbers, Dates, and Times Iterators and Generators Files and I/O Data Encoding and Processing Functions Classes and Objects Metaprogramming Modules and Packages Network and Web Programming Concurrency Utility Scripting and System Administration Testing, Debugging, and Exceptions C Extensions


Compare

If you need help writing programs in Python 3, or want to update older Python 2 code, this book is just the ticket. Packed with practical recipes written and tested with Python 3.3, this unique cookbook is for experienced Python programmers who want to focus on modern tools and idioms. Inside, you’ll find complete recipes for more than a dozen topics, covering the core Pyth If you need help writing programs in Python 3, or want to update older Python 2 code, this book is just the ticket. Packed with practical recipes written and tested with Python 3.3, this unique cookbook is for experienced Python programmers who want to focus on modern tools and idioms. Inside, you’ll find complete recipes for more than a dozen topics, covering the core Python language as well as tasks common to a wide variety of application domains. Each recipe contains code samples you can use in your projects right away, along with a discussion about how and why the solution works. Topics include: Data Structures and Algorithms Strings and Text Numbers, Dates, and Times Iterators and Generators Files and I/O Data Encoding and Processing Functions Classes and Objects Metaprogramming Modules and Packages Network and Web Programming Concurrency Utility Scripting and System Administration Testing, Debugging, and Exceptions C Extensions

30 review for Python Cookbook

  1. 5 out of 5

    Sean

    Lots of practical recipes for using Python more effectively. Just to clarify for certain of my friends (you know who you are!): * Python is a popular computer language, named after "Monty Python's Flying Circus", a British TV comedy * The O'Reilly Cookbook series uses the metaphor of cooking to present a collection of small, practical solutions ("recipes") to specific programming problems. Hence, despite my misleading lead-in, the Python Cookbook has nothing to do with preparing snakes for human c Lots of practical recipes for using Python more effectively. Just to clarify for certain of my friends (you know who you are!): * Python is a popular computer language, named after "Monty Python's Flying Circus", a British TV comedy * The O'Reilly Cookbook series uses the metaphor of cooking to present a collection of small, practical solutions ("recipes") to specific programming problems. Hence, despite my misleading lead-in, the Python Cookbook has nothing to do with preparing snakes for human consumption.

  2. 4 out of 5

    Mark Pergamenshik

    As a Java programmer that wants to learn Python this book was OK. There are some good recipes but most of the book (about 85%) can be summarized in one sentence "You want to do some job, find third party library to do it for you" Especially annoying that in some recipes the section ends with something like "there are some better libraries to do this job so use them and not the suggested in recipe?!?!?!" Some of the recipes are very basic and can be summarized in few lines but in many cases those re As a Java programmer that wants to learn Python this book was OK. There are some good recipes but most of the book (about 85%) can be summarized in one sentence "You want to do some job, find third party library to do it for you" Especially annoying that in some recipes the section ends with something like "there are some better libraries to do this job so use them and not the suggested in recipe?!?!?!" Some of the recipes are very basic and can be summarized in few lines but in many cases those recipes are stretched to a few pages.

  3. 5 out of 5

    Louis

    The third edition of Python Cookbook is part of what seems to be a general trend of issuing new editions focusing on Python 3. For me, whose focus is on data analysis and technical computing, this is the time to be thinking about the change from Python 2 to Python 3 as the base libraries of Numpy, Scipy, Matplotlib, and iPython have been ported, and the various other libraries I use that depend on these are being ported as well. But this edition is not just porting the old cookbook, it is a comp The third edition of Python Cookbook is part of what seems to be a general trend of issuing new editions focusing on Python 3. For me, whose focus is on data analysis and technical computing, this is the time to be thinking about the change from Python 2 to Python 3 as the base libraries of Numpy, Scipy, Matplotlib, and iPython have been ported, and the various other libraries I use that depend on these are being ported as well. But this edition is not just porting the old cookbook, it is a complete rewrite to go with the big shift that was Python 2 to 3. Because a lot of what I used the old cookbook and many of the recipes at the ActiveState website was for handling issues related to crossing versions (I had some projects with Jython, which was several versions behind CPython) and ways of getting around issues that are purportedly solved in Python 3. For that the third edition of Python Cookbook fills its purpose of showing idiomatic ways of performing some programming tasks, and being a reference for how to do thing well and elegantly taking advantage of the language and libraries, not fighting it. I focus on using Python as a data analysis platform. So I generally only learned as much of the language I needed to in order to use the scientific stack of Numpy, Scipy, Matplotlib, Pandas, and the libraries that were built around them. But that means that I have not gotten to know large portions of the standard library. And introductory books don't cover this either, they focus on using the language itself. There are also a large number of books and references that focus on Python as a web development tool or a system administration tool, so those parts of the standard library get a lot of coverage in teaching materials. But the rest you almost have to stumble upon. In ideal conditions, the way you would learn about much of the standard library is to have someone who was more experienced nearby show you what you needed to know, as she demonstrated methods in her code that did the things that you never learned in class. But sometimes there is no such person. The Python Cookbook plays this role, of demonstrating how to do things in Python 3 that are practical and you probably would not learn while learning the language itself. Some areas that I found useful are the heapq, generators, and the I/O. heapq is a module and data structure I just never got around to learning. Usually discussions about Python data structures made their way to deque and heapq was discussed by reference. But after looking at the priority queue discussion, I fired up an iPython notebook and went through every recipe that used heapq and I've started thinking about how to rewrite a model I recently coded up. Generators and File I/O are areas that I knew in passing through my use with them in data analysis, but Python Cookbook opened up new ways of understanding (I am starting to get why JSON is so useful). Now, there is nothing special about these, but seeing these parts of the standard library in use in an elegant way is something beyond what you would get from a module documentation or a standard tutorial. I do miss the introductions to each chapter that was in the 1st and 2nd editions of Python Cookbook. But what Python Cookbook does give is an idiomatic feel of using Python3, when there are not all that many mentors out there to go around. So this is something very useful for others who are starting to use Python 3. It is not for learning the language, but it is for using the language well. Disclaimer: I received a free electronic copy of this book as part of the Oreilly Bloggers program

  4. 5 out of 5

    Jeanne Boyarsky

    The “Python Cookbook” (3rd edition) is over 600 pages full of content. The recipes vary extensively in difficulty and scope. From simple string concatenation to writing a (BNF) recursive decent parsers. The book covers Python 3.3. The authors warn some recipes aren't backward compatible with 2.X. While I would have liked more on the transition, I'm not a Python developer – I just do some scripts. It's entirely possible nobody cares about compatibility. My favorite recipe was on CSV. Paring was sh The “Python Cookbook” (3rd edition) is over 600 pages full of content. The recipes vary extensively in difficulty and scope. From simple string concatenation to writing a (BNF) recursive decent parsers. The book covers Python 3.3. The authors warn some recipes aren't backward compatible with 2.X. While I would have liked more on the transition, I'm not a Python developer – I just do some scripts. It's entirely possible nobody cares about compatibility. My favorite recipe was on CSV. Paring was shown but a library was also covered along with the reasons to not implement it yourself. The recipes assume a working knowledge of Python. I have just enough knowledge to be able to follow them. And the book is a great resource with common idioms and techniques. It is certainly an advanced book and I highly recommend it. (If you are starting out with Python, I recommend reading “Think Python” first.) Disclosure: I received a free copy of this book from the publisher in exchange for writing a review.

  5. 5 out of 5

    Allele

    This is idiomatic Python. This book is made all the more enticing by the fact that it focuses on using Python 3. At the time of its publication, it was the best resource for learning how to write lean code using the features available in Python 3. At the time of my writing this review, it is still *the* book I'd recommend for that purpose. Go get it, and read it twice. Your Python will thank you. :)

  6. 4 out of 5

    gully

    I really liked this book, I learned a lot of Python 3 without even realizing it. When I sat down for a Python 3 project, the new stuff was all second-nature. It covers tons of disparate applications, some of which were over my head. It's a great reference.

  7. 5 out of 5

    WloHu

    Great book! A must-have on work desk. It is so well structured: chapters grouped by programming techniques or domain tasks and each chapter has recipes ordered by complexity level. This makes the book good even for not-so-begginer Python programmers, they can just read first 5 recipes in each chapter or read chapter until they start having problems with smooth reading and understanding. The recipes include only starndard library ingredients however alternative 3rd party tools are also mentioned. T Great book! A must-have on work desk. It is so well structured: chapters grouped by programming techniques or domain tasks and each chapter has recipes ordered by complexity level. This makes the book good even for not-so-begginer Python programmers, they can just read first 5 recipes in each chapter or read chapter until they start having problems with smooth reading and understanding. The recipes include only starndard library ingredients however alternative 3rd party tools are also mentioned. There are few internal recipe cross references in more complex recipes. For sure I will use this book again, for instance as starting point for C extensions.

  8. 5 out of 5

    Mark Eccles

    I am a part time Python programmer, using it for simple uses cases such as log file parsing, serving RESTful APIs, and machine learning pipelines. This book was an interesting read. I picked up a lot of new knowledge of some of Python's popular modules and language features. Most interesting was the sections on iterators, generators, context managers, and classes. These are done slightly different in Python compared with other languages like Java, so very helpful for someone experience with prog I am a part time Python programmer, using it for simple uses cases such as log file parsing, serving RESTful APIs, and machine learning pipelines. This book was an interesting read. I picked up a lot of new knowledge of some of Python's popular modules and language features. Most interesting was the sections on iterators, generators, context managers, and classes. These are done slightly different in Python compared with other languages like Java, so very helpful for someone experience with programming in other languages. It would save me falling into traps or writing unnecessarily long code. This book also serves as a reference / style guide.

  9. 4 out of 5

    David Celjuska

    It is a good reference book. I read half of the book chapter after chapter and then I pick what was interesting. It is a book to come back. I would prefer if the book had some basic introduction to Python for beginners. I have programming background in C++, Java, PHP, Scala, but haven't had that, it would be way too difficult to go thought. There are many topics and terms that are not explained: closures, packages, lambda, etc. so some basics are required.

  10. 5 out of 5

    Sarah

    This is a great tour through the "fancier" tools available in Python. (What are generators and iterators and why would you use them? Are there elegant built-in tricks for string parsing and data structures? etc.) It's structured as "problem: solution!" and is very dense but clear. Works either for reading cover-to-cover and using as a reference.

  11. 4 out of 5

    Chris

    Very useful. An excellent reference. Essential even. I also recommend reading it cover to cover. That is tough going (it’s an all-encompassing tome) and will take some time. However it’s incredibly valuable for helping shrink the space of unknown unknown best practices in Python. “Oh wait, isn’t there a better way of loading package data files... yes, that’s right...”

  12. 5 out of 5

    Indrani

    Excellent material for acing for python skill. This is not for beginners though. You need to have some hands on experience in python to grasp the material. Different recipes to help you understand the advanced concept of the language. This book will make your day job easier. Highly recommended for anyone want to perfect python skill.

  13. 4 out of 5

    Stephen Cook

    Excellent compendium of Python recipes and idioms. Particularly useful for experienced programmers who want to become proficient quickly with Python but avoid importing assumptions from other languages.

  14. 4 out of 5

    Mahmud Ahsan

    Very good book to know about some quick solution for common problems.

  15. 4 out of 5

    Jothi

    It will be useful for me to learn python

  16. 5 out of 5

    Kalyan Tirunahari

    If you are at an intermediate level to Python and want take it to advanced level this is the right book for you. Tons of relevant examples.

  17. 4 out of 5

    D.N.

    I'm glad to be done with this for now, as I am with most books intended for reference use that I try reading cover to cover. Nevertheless it's a great resource, and I think the recipes here are a bit higher quality than some of the other O'Reilly Cookbook titles. Good cross-referencing and encouragement to refer to material in related chapters. An essential reference if you are learning Python, and a source for some great ideas.

  18. 5 out of 5

    Dave Peticolas

    This Python programming cookbook lives up to the standard set by the excellent Perl Cookbook. In addition, this book is associated with a website where the programming recipes were originally collected from Python users. The website continues to grow and collect new recipes and thus represents a great resource for Python programmers. This Python programming cookbook lives up to the standard set by the excellent Perl Cookbook. In addition, this book is associated with a website where the programming recipes were originally collected from Python users. The website continues to grow and collect new recipes and thus represents a great resource for Python programmers.

  19. 4 out of 5

    Eric Casteleijn

    A solid Python reference, containing recipes for many common tasks. A valuable addition to any Pyhonista's library. If I had to find fault with anything it's that the code samples could use a little cleaning up. The coding style is inconsistent (understandably with two authors), and not always in agreement with generally accepted best practices (pep8). I feel running the examples through a linter would have fixed that, but it's immaterial to the utility of individual examples.

  20. 4 out of 5

    Vishell

    I think there is no option as 'currently-reading' and 'read', because you reference to that book and collecting knowledge step by step. And i can say that this book is really good cookbook, maybe python as a language makes it much better as it would be with another language, but anyway. It's really good one!

  21. 5 out of 5

    Bill

    I love the cookbook series. Lots of clever tricks and details about the language you didn't know before. Plus I have to recommend this because recipe 7.3 "Using Compression with Pickling" is the first thing I've ever had published in a book.

  22. 5 out of 5

    Yuriy

    This is guide book with interesting and unexpected examples and trics. Best approach - reading chapter, which has actually information for you current task. Third (3) edition is best, don't read previous versions.

  23. 4 out of 5

    Anton Antonov

    A must-have for every Python developer aiming to code in the most Pythonic way. The authors' discussions, approaches and solutions to problems are way better than what the current Python docs can offer. I found it most useful for Iterators, Generators and Meta-programming.

  24. 5 out of 5

    Andrew Montalenti

    the book that taught me that Python is highly practical

  25. 5 out of 5

    Enrico

    Partially usable, definitely a cookbook is not for me... For a software recipe I just prefer StackOverflow. Partially usable, definitely a cookbook is not for me... For a software recipe I just prefer StackOverflow.

  26. 4 out of 5

    Rakesh

    It's just 'okay' as far as a python cookbook is concerned. Aids programming practice, but lacks subtle qualities of a readable text.

  27. 5 out of 5

    Nick

    Excellent book! Really learned a lot from it.

  28. 5 out of 5

    Gert

    Perfect book for the non-newbie. Clear and well explained recipes for typical problems.

  29. 4 out of 5

    Chris Sosa

    Good as a reference book but not that great otherwise

  30. 5 out of 5

    Tom

    Very recommended for every python developer. Most of the receipts stands for their own and shows, with clear explanations, how to achieve selected goals using elegant, readable, code.

Add a review

Your email address will not be published. Required fields are marked *

Loading...
We use cookies to give you the best online experience. By using our website you agree to our use of cookies in accordance with our cookie policy.