The Python Standard Library By Example

(häftad)

av Doug Hellmann

Bloggar      
Format:
Häftad (paperback)
Utgiven:
2011-06-14
Språk:
Engelska

Hellmanns writing has become an indispensable resource for me and many others as it fills a critical gap in Python Documentation with examples.

Jesse Noller, Python Core Developer and PSF Board Member

Master the Powerful Python Standard Library through Real Code Examples

 

The Python Standard Library contains hundreds of modules for interacting with the operating system, interpreter, and Internetall extensively tested and ready to jump-start your application development. The Python Standard Library by Example introduces virtually every important area of the Python 2.7 library through concise, stand-alone source code/output examples, designed for easy learning and reuse.

 

Building on his popular Python Module of the Week blog series, author and Python expert Doug Hellmann focuses on showing not telling. He explains code behavior through downloadable examples that fully demonstrate each feature.

 

Youll find practical code for working with text, data types, algorithms, math, file systems, networking, the Internet, XML, email, cryptography, concurrency, runtime and language services, and much more. Each section fully covers one module, and links to valuable additional resources, making this book an ideal tutorial and reference. Coverage includes

  • Manipulating text with string, textwrap, re, and difflib
  • Implementing data structures: collections, array, queue, struct, copy, and more
  • Reading, writing, and manipulating files and directories
  • Regular expression pattern matching
  • Exchanging data and providing for persistence Archiving and data compression
  • Managing processes and threads
  • Using application building blocks: parsing command-line options, prompting for passwords, scheduling events, and logging
  • Testing, debugging, and compilation
  • Controlling runtime configuration
  • Using module and package utilities

If youre new to Python, this book will quickly give you access to a whole new world of functionality. If youve worked with Python before, youll discover new, powerful solutions and better ways to use the modules youve already tried.

Passar bra ihop

The Python Standard Library By Example + Matplotlib for Python Developers
De som köpt den här boken har ofta också köpt Matplotlib for Python Developers (häftad) av S Tosi
Pris för båda:
697:-Köp

Kundrecensioner

Bli först med att recensera och betygsätt boken The Python Standard Library By Example - du kan vinna 200 kr varje månad i tävlingen "Månadens recension".

Bloggat om The Python Standard Library By Example

Övrig information

Doug Hellmann is currently a senior developer with Racemi, Inc., and communications director of the Python Software Foundation. He has been programming in Python since version 1.4 and has worked on a variety of Unix and non-Unix platforms for projects in fields such as mapping, medical news publishing, banking, and data center automation. After a year as a regular columnist for Python Magazine, he served as editor-in-chief from 2008-2009. Since 2007, Doug has published the popular "Python Module of the Week" series on his blog. He lives in Athens, Georgia.

Innehållsförteckning

Tables xxxi

Foreword xxxiii

Acknowledgments xxxvii

About the Author xxxix

 

Introduction 1

 

Chapter 1: Text 3

1.1 stringText Constants and Templates 4

1.2 textwrapFormatting Text Paragraphs 9

1.3 reRegular Expressions 13

1.4 difflibCompare Sequences 61

 

Chapter 2: Data Structures 69

2.1 collectionsContainer Data Types 70

2.2 arraySequence of Fixed-Type Data 84

2.3 heapqHeap Sort Algorithm 87

2.4 bisectMaintain Lists in Sorted Order 93

2.5 QueueThread-Safe FIFO Implementation 96

2.6 structBinary Data Structures 102

2.7 weakrefImpermanent References to Objects 106

2.8 copyDuplicate Objects 117

2.9 pprintPretty-Print Data Structures 123

 

Chapter 3: Algorithms 129

3.1 functoolsTools for Manipulating Functions 129

3.2 itertoolsIterator Functions 141

3.3 operatorFunctional Interface to Built-in Operators 153

3.4 contextlibContext Manager Utilities 163

 

Chapter 4: Dates and Times 173

4.1 timeClock Time 173

4.2 datetimeDate and Time Value Manipulation 180

4.3 calendarWork with Dates 191

 

Chapter 5: Mathematics 197

5.1 decimalFixed and Floating-Point Math 197

5.2 fractionsRational Numbers 207

5.3 randomPseudorandom Number Generators 211

5.4 mathMathematical Functions 223

 

Chapter 6: The File System 247

6.1 os.pathPlatform-Independent Manipulation of Filenames 248

6.2 globFilename Pattern Matching 257

6.3 linecacheRead Text Files Efficiently 261

6.4 tempfileTemporary File System Objects 265

6.5 shutilHigh-Level File Operations 271

6.6 mmapMemory-Map Files 279

6.7 codecsString Encoding and Decoding 284

6.8 StringIOText Buffers with a Fi...

De som köpt "The Python Standard Library By Example" har även köpt:

The Elements of Computing Systems (häftad)

The Elements of Computing Systems

Noam Nisan, Shimon Schocken (häftad)
215:-
Programming Python, 4th Edition (häftad)

Programming Python, 4th Edition

Mark Lutz (häftad)
346:-
Speech and Language Processing: International Edition, 2nd Edition (häftad)

Speech and Language Processing: International Editio...

Daniel Jurafsky, James H Martin (häftad)
474:-
Computer Systems 4th Edition (inbunden)

Computer Systems 4th Edition

J Warford (inbunden)
359:-
Computer Science Illuminated 4th Edition (häftad)

Computer Science Illuminated 4th Edition

N Dale, J Lewis (häftad)
359:-
The Python Standard Library By Example (häftad)

Fler böcker inom

  • Titel: The Python Standard Library By Example
  • ISBN: 9780321767349
  • Förlag: ADDISON-WESLEY
  • Utgivningsland: USA
  • Utgivningsort: New Jersey
  • Upplaga: 1
  • Antal sidor: 1302
  • Vikt: 1610 g
  • Höjd: 228 mm
  • Antal komponenter: 1
  • Format: Häftad (paperback)