Download Python Cookbook (2nd Edition) by Alex Martelli PDF

By Alex Martelli

ISBN-10: 0596007973

ISBN-13: 9780596007973

Preview
Portable, strong, and a breeze to exploit, Python is the preferred open resource object-oriented programming language used for either standalone courses and scripting purposes. it really is now getting used by means of a growing number of significant agencies, together with NASA and Google. up-to-date for Python 2.4, The Python Cookbook, 2d version deals a wealth of beneficial code for all Python programmers, not only complex practitioners. Like its predecessor, the hot version presents options to difficulties that Python programmers face daily. It now comprises over two hundred recipes that variety from basic projects, comparable to operating with dictionaries and checklist comprehensions, to advanced projects, reminiscent of tracking a community and development a templating process. This revised model additionally contains new chapters on issues resembling time, funds, and metaprogramming. Here's an inventory of extra themes coated: * Manipulating textual content
* looking out and sorting
* operating with documents and the filesystem
* Object-oriented programming
* facing threads and strategies
* process management
* Interacting with databases
* growing consumer interfaces
* community and internet programming
* Processing XML
* disbursed programming
* Debugging and testing
one other good thing about The Python Cookbook, second variation is its trio of authors--three recognized Python programming specialists, who're hugely obvious on e-mail lists and in newsgroups, and communicate frequently at Python meetings. With rankings of useful examples and pertinent history details, The Python Cookbook, 2d variation is the only resource you wish if you're trying to construct effective, versatile, scalable, and well-integrated systems.
---
Alt. ISBN:9780596007973

Show description

Read or Download Python Cookbook (2nd Edition) PDF

Best python books

Learning Python: Powerful Object-Oriented Programming (4th Edition)

Google and YouTube use Python simply because it's hugely adaptable, effortless to keep up, and allows quick improvement. in order to write top quality, effective code that's simply built-in with different languages and instruments, this hands-on booklet may help you be efficient with Python speedy -- even if you're new to programming or simply new to Python.

Real Python: An Introduction to Python Through Practical Examples

An ebook to coach programming via hands-on, attention-grabbing examples which are priceless and fun!

Python is a smart programming language. It's loose, strong, more straightforward to learn than such a lot languages, and has extensions to be had to do virtually something you'll think automatically.

But how do you certainly use it? There are hundreds assets in the market for studying Python, yet none of them are very sensible or attention-grabbing - in its place, they move over every one thought one after the other, by no means tying whatever jointly, yet spending lots of time misplaced in technical language, discussing the twenty other ways to complete every one uncomplicated activity. ..

I are looking to write an book that at last supplies a concise advent to every thing chances are you'll really are looking to do with Python.

We'll begin with a short yet thorough evaluate of all of the fundamentals, so that you don't even desire any previous adventure with programming. however the majority of the booklet may be spent build up instance code to unravel attention-grabbing real-world problems.

Python is astounding for automating repetitive projects that may another way take you hours - for example, quick accumulating info from the internet, or renaming 1000s of documents. a number of the issues that I'm making plans to cover:

Collecting info from webpages (web scraping)
Interacting with PDF documents - analyzing info, developing PDFs, enhancing pages, including passwords. ..
Interacting with Excel documents (less performance in OS X)
Calling different outdoor courses from inside Python
Files - read/write/modify, unzip, rename, circulation, etc.
Basic online game development
Interacting with SQL databases (internal and ODBC connections)
GUI (Graphical person Interface) layout - developing uncomplicated point-and-click courses that anybody can use
Any different subject matters that you simply, my backers, are such a lot in!
Update: through well known call for, I'll be including internet program development

All similar direction fabrics downloadable at: http://www. psychotix. com/share/Real_Python. zip

Python Algorithms: Mastering Basic Algorithms in the Python Language

Python Algorithms explains the Python method of set of rules research and layout.

Written by means of Magnus Lie Hetland, writer of starting Python, this booklet is sharply fascinated with classical algorithms, however it additionally supplies a high-quality figuring out of primary algorithmic problem-solving suggestions.

The publication bargains with essentially the most vital and difficult components of programming and desktop technological know-how, yet in a hugely pedagogic and readable manner.

The booklet covers either algorithmic thought and programming perform, demonstrating how concept is mirrored in actual Python programs.

Well-known algorithms and information constructions which are equipped into the Python language are defined, and the consumer is proven how you can enforce and review others himself.

Testing Python: Applying Unit Testing, TDD, BDD and Acceptance Testing

Primary checking out methodologies utilized to the preferred Python language

Testing Python; employing Unit trying out, TDD, BDD and popularity checking out is the main finished publication on hand on trying out for one of many best software program programming languages on this planet. Python is a common selection for brand new and skilled builders, and this hands-on source is a far wanted advisor to enterprise-level trying out improvement methodologies. The ebook will express you why Unit trying out and TDD may end up in purifier, extra versatile programs.

Unit checking out and Test-Driven improvement (TDD) are more and more must-have abilities for software program builders, it doesn't matter what language they paintings in. In firm settings, it's severe for builders to make sure they regularly have operating code, and that's what makes checking out methodologies so beautiful. This ebook will educate you the main commonplace trying out recommendations and may introduce to you to nonetheless others, overlaying functionality trying out, non-stop trying out, and more.

Learn Unit trying out and TDD—important improvement methodologies that lie on the center of Agile development
Enhance your skill to paintings with Python to increase strong, versatile purposes with fresh code
Draw at the services of writer David Sale, a number one united kingdom developer and tech commentator
Get sooner than the gang by way of getting to know the underappreciated international of Python testing
Knowledge of software program checking out in Python may perhaps set you except Python builders utilizing outdated methodologies. Python is a traditional healthy for TDD and checking out Python is a must-read textual content for someone who desires to boost services in Python programming.

Extra resources for Python Cookbook (2nd Edition)

Example text

Another approach is to enclose the string in a pair of matching triple quotes (either single or double): bigger = """ This is an even bigger string that spans three lines. """ Using triple quotes, you don't need to use the continuation character, and line breaks in the string literal are preserved as newline characters in the resulting Python string object. You can also make a string literal "raw" string by preceding it with an r or R: big = r"This is a long string\ with a backslash and a newline in it" With a raw string, backslash escape sequences are left alone, rather than being interpreted.

Often, one does not need indexing, slicing, and lenthe ability to iterate, one item at a time, suffices. In that case, one should speak of an iterable (or, to focus on the finite number of items issue, a bounded iterable). Iterables that are not sequences include dictionaries (iteration gives the keys of the dictionary, one at a time in arbitrary order), file objects (iteration gives the lines of the text file, one at a time), and many more, including iterators and generators. ). org/moin/PythonGlossary, you can find a Python Glossary that can help you with these and several other terms.

Codes greater than 126) or are strange control codes. 30 (30%), or for the string of those characters that are to be deemed "text" (which defaults to normal ASCII characters plus the four "normal" control characters, meaning ones that are often found in text). For example, if you expected Italian text encoded as ISO-8859-1, you could add the accented letters used in Italian, "àèéìÃ2Ã1", to the text_characters argument. Often, what you need to check as being either binary or text is not a string, but a file.

Download PDF sample

Rated 4.99 of 5 – based on 13 votes