Table of Contents. Dive Into Python...1

Similar documents
Praise for Dive Into Python:

Python License APPENDIX A. A. History of the Software. All of the sample code in this book is licensed under the Python license

Dive Into Python. Python from novice to pro. Mark Pilgrim

Table of Contents. Dive Into Python...1

Programming in Python

Python in 10 (50) minutes

PTN-102 Python programming

L435/L555. Dept. of Linguistics, Indiana University Fall 2016

,

Large-Scale Networks

Programming in Python Advanced

Django with Python Course Catalog

PTN-202: Advanced Python Programming Course Description. Course Outline

PYTHON TRAINING COURSE CONTENT

Python INTRODUCTION: Understanding the Open source Installation of python in Linux/windows. Understanding Interpreters * ipython.

Intermediate Python 3.x

Introduction to Python

Introduction to Python. Didzis Gosko

Flask Web Development Course Catalog

DCLI User's Guide. Data Center Command-Line Interface 2.7.0

Duration: Six Weeks Faculty : Mr Sai Kumar, Having 10+ Yrs Experience in IT

Outline. S: past, present and future Some thoughts. The 80s. Interfaces - 60s & 70s. Duncan Temple Lang Department of Statistics UC Davis

EL2310 Scientific Programming

Foundations of Python

Introduction to Programming Using Java (98-388)

TH IRD EDITION. Python Cookbook. David Beazley and Brian K. Jones. O'REILLY. Beijing Cambridge Farnham Köln Sebastopol Tokyo

CNIT 129S: Securing Web Applications. Ch 10: Attacking Back-End Components

This course is designed for anyone who needs to learn how to write programs in Python.

Python Development with PyDev and Eclipse -

Proxying. Why and How. Alon Altman. Haifa Linux Club. Proxying p.1/24

CSC102 INTRO TO PROGRAMMING WITH PYTHON REVIEW MICHAEL GROSSBERG

PYTHON CONTENT NOTE: Almost every task is explained with an example

Data Science with Python Course Catalog

CS Programming Languages: Python

Webgurukul Programming Language Course

Python Scripting for Computational Science

Basic Python 3 Programming (Theory & Practical)

Introduction 13. Feedback Downloading the sample files Problem resolution Typographical Conventions Used In This Book...

Student Database Challenge Problem

RKN 2015 Application Layer Short Summary

Python Training. Complete Practical & Real-time Trainings. A Unit of SequelGate Innovative Technologies Pvt. Ltd.

Learn Windows PowerShell 3 in a Month of Lunches

CHAPTER 1: INTRODUCING C# 3

Overview. : Cloudera Data Analyst Training. Course Outline :: Cloudera Data Analyst Training::

Python Scripting for Computational Science

Mastering CMake Fifth Edition

COPYRIGHTED MATERIAL. Contents. Part I: C# Fundamentals 1. Chapter 1: The.NET Framework 3. Chapter 2: Getting Started with Visual Studio

Linux Essentials. Smith, Roderick W. Table of Contents ISBN-13: Introduction xvii. Chapter 1 Selecting an Operating System 1

Center for Systems and Software Engineering University of Southern California. Center for Systems And Software Engineering. UCC v.2011.

Table of Contents EVALUATION COPY

C# 6.0 in a nutshell / Joseph Albahari & Ben Albahari. 6th ed. Beijin [etc.], cop Spis treści

AppleScript Overview

SOFTWARE ARCHITECTURE SUMMARY. Tatsuya Hagino

DCLI User's Guide. Modified on 20 SEP 2018 Data Center Command-Line Interface

Managing Your Biological Data with Python

Blended Learning Outline: Cloudera Data Analyst Training (171219a)

Android" Application Development SAMS. Sams Teach Yourself. Shane Conder. Lauren Darcey. Second Edition

20.5. urllib Open arbitrary resources by URL

DiskPulse DISK CHANGE MONITOR

Beyond Blocks: Python Session #1

Acknowledgments Introduction. Part I: Programming Access Applications 1. Chapter 1: Overview of Programming for Access 3

Learn Well Technocraft

Here Scripts. Writing An HTML File With A Script

UNIT I. A protocol is a precise set of rules defining how components communicate, the format of addresses, how data is split into packets

The current topic: Python. Announcements. Python. Python

PYTHON. Scripting for ArcGIS. writeoutput = Inputfc = ar. .ext.{) OUtpUt fc =.. Paul A. Zandbergen. axcpy random. .arcpy, Describe (' is.

DCLI User's Guide. Data Center Command-Line Interface 2.9.1

Installation Notes for Enhydra Director Netscape/IPlanet Web Servers

How Emacs Evolves to Suit Your Needs p. 1 How Emacs Differs from Other Software p. 3 Software and the User p. 4 Emacs Vocabulary and Conventions p.

LABORATORY OF DATA SCIENCE. Python & Spyder- recap. Data Science & Business Informatics Degree

EL2310 Scientific Programming

argcomplete Documentation Andrey Kislyuk

argcomplete Documentation

PYTHON FOR KIDS A Pl ayfu l I ntrodu ctio n to Prog r am m i ng J a s o n R. B r i g g s

Course Title: Python + Django for Web Application

Detects Potential Problems. Customizable Data Columns. Support for International Characters

neon HTTP/WebDAV client library by Joe Orton

DCLI User's Guide. Data Center Command-Line Interface

Websphere Force Uninstall Application Server 7 Linux Installation

1 RPN (Danny Yoo / Donovan Preston)

Introduction p. 1 Basic Programming Introduction p. 7 Introduction to Python p. 7 Why Use Python? p. 10 Main Technical Features p.

Bash command shell language interpreter

APIs and API Design with Python

Using Git For Development. Shantanu Pavgi, UAB IT Research Computing

Integration Services. Creating an ETL Solution with SSIS. Module Overview. Introduction to ETL with SSIS Implementing Data Flow

Distributed Systems Principles and Paradigms. Chapter 12: Distributed Web-Based Systems

TestCenter Manual. TestCenter Manual Copyright MeVis Medical Solutions, Published

Please be informed that a new CTC++ version has been released.

DATABASE SYSTEMS. Database programming in a web environment. Database System Course,

ZSI: The Zolera Soap Infrastructure User s Guide. Release 2.0.0

Using IDLE for

Data Analytics Job Guarantee Program

Isight Component Development 5.9

Ftp Command Line Commands Linux Example Windows Put

Spyder Documentation. Release 3. Pierre Raybaut

streamio Documentation

Apica ZebraTester. Advanced Load Testing Tool and Cloud Platform

Course Curriculum Accord info Matrix Pvt.Ltd Page 1 of 7

Nginx HTTP Server. Adopt Nginx for your web applications to make the most of your infrastructure and serve pages faster than ever.

Textadept Quick Reference. Mitchell

Transcription:

...1 Chapter 1. Installing Python...2 1.1. Which Python is right for you?...2 1.2. Python on Windows...2 1.3. Python on Mac OS X...3 1.4. Python on Mac OS 9...5 1.5. Python on RedHat Linux...5 1.6. Python on Debian GNU/Linux...6 1.7. Python Installation from Source...6 1.8. The Interactive Shell...7 1.9. Summary...8 Chapter 2. Your First Python Program...9 2.1. Diving in...9 2.2. Declaring Functions...9 2.3. Documenting Functions...10 2.4. Everything Is an Object...11 2.5. Indenting Code...13 2.6. Testing Modules...14 Chapter 3. Native Datatypes...15 3.1. Introducing Dictionaries...15 3.2. Introducing Lists...17 3.3. Introducing Tuples...22 3.4. Declaring variables...23 3.5. Formatting Strings...25 3.6. Mapping Lists...26 3.7. Joining Lists and Splitting Strings...28 3.8. Summary...29 Chapter 4. The Power Of Introspection...31 4.1. Diving In...31 4.2. Using Optional and Named Arguments...32 4.3. Using type, str, dir, and Other Built In Functions...33 4.4. Getting Object References With getattr...36 4.5. Filtering Lists...38 4.6. The Peculiar Nature of and and or...39 4.7. Using lambda Functions...41 4.8. Putting It All Together...43 4.9. Summary...45 Chapter 5. Objects and Object Orientation...47 5.1. Diving In...47 5.2. Importing Modules Using from module import...49 5.3. Defining Classes...50 5.4. Instantiating Classes...53 5.5. Exploring UserDict: A Wrapper Class...54 5.6. Special Class Methods...56 5.7. Advanced Special Class Methods...59 i

Chapter 5. Objects and Object Orientation 5.8. Introducing Class Attributes...60 5.9. Private Functions...62 5.10. Summary...63 Chapter 6. Exceptions and File Handling...64 6.1. Handling Exceptions...64 6.2. Working with File Objects...66 6.3. Iterating with for Loops...70 6.4. Using sys.modules...72 6.5. Working with Directories...74 6.6. Putting It All Together...77 6.7. Summary...78 Chapter 7. Regular Expressions...81 7.1. Diving In...81 7.2. Case Study: Street Addresses...81 7.3. Case Study: Roman Numerals...83 7.4. Using the {n,m} Syntax...85 7.5. Verbose Regular Expressions...88 7.6. Case study: Parsing Phone Numbers...89 7.7. Summary...93 Chapter 8. HTML Processing...94 8.1. Diving in...94 8.2. Introducing sgmllib.py...98 8.3. Extracting data from HTML documents...100 8.4. Introducing BaseHTMLProcessor.py...102 8.5. locals and globals...104 8.6. Dictionary based string formatting...107 8.7. Quoting attribute values...108 8.8. Introducing dialect.py...109 8.9. Putting it all together...111 8.10. Summary...113 Chapter 9. XML Processing...115 9.1. Diving in...115 9.2. Packages...121 9.3. Parsing XML...123 9.4. Unicode...125 9.5. Searching for elements...129 9.6. Accessing element attributes...131 9.7. Segue...132 Chapter 10. Scripts and Streams...133 10.1. Abstracting input sources...133 10.2. Standard input, output, and error...136 10.3. Caching node lookups...140 10.4. Finding direct children of a node...141 10.5. Creating separate handlers by node type...141 ii

Chapter 10. Scripts and Streams 10.6. Handling command line arguments...143 10.7. Putting it all together...146 10.8. Summary...148 Chapter 11. HTTP Web Services...149 11.1. Diving in...149 11.2. How not to fetch data over HTTP...151 11.3. Features of HTTP...152 11.4. Debugging HTTP web services...153 11.5. Setting the User Agent...155 11.6. Handling Last Modified and ETag...156 11.7. Handling redirects...159 11.8. Handling compressed data...163 11.9. Putting it all together...165 11.10. Summary...167 Chapter 12. SOAP Web Services...168 12.1. Diving In...168 12.2. Installing the SOAP Libraries...169 12.3. First Steps with SOAP...171 12.4. Debugging SOAP Web Services...172 12.5. Introducing WSDL...173 12.6. Introspecting SOAP Web Services with WSDL...174 12.7. Searching Google...176 12.8. Troubleshooting SOAP Web Services...179 12.9. Summary...182 Chapter 13. Unit Testing...183 13.1. Introduction to Roman numerals...183 13.2. Diving in...184 13.3. Introducing romantest.py...184 13.4. Testing for success...187 13.5. Testing for failure...189 13.6. Testing for sanity...190 Chapter 14. Test First Programming...193 14.1. roman.py, stage 1...193 14.2. roman.py, stage 2...196 14.3. roman.py, stage 3...199 14.4. roman.py, stage 4...202 14.5. roman.py, stage 5...205 Chapter 15. Refactoring...208 15.1. Handling bugs...208 15.2. Handling changing requirements...210 15.3. Refactoring...216 15.4. Postscript...219 15.5. Summary...221 iii

Chapter 16. Functional Programming...223 16.1. Diving in...223 16.2. Finding the path...224 16.3. Filtering lists revisited...226 16.4. Mapping lists revisited...228 16.5. Data centric programming...229 16.6. Dynamically importing modules...230 16.7. Putting it all together...231 16.8. Summary...234 Chapter 17. Dynamic functions...235 17.1. Diving in...235 17.2. plural.py, stage 1...235 17.3. plural.py, stage 2...237 17.4. plural.py, stage 3...239 17.5. plural.py, stage 4...240 17.6. plural.py, stage 5...242 17.7. plural.py, stage 6...243 17.8. Summary...246 Chapter 18. Performance Tuning...247 18.1. Diving in...247 18.2. Using the timeit Module...249 18.3. Optimizing Regular Expressions...250 18.4. Optimizing Dictionary Lookups...253 18.5. Optimizing List Operations...256 18.6. Optimizing String Manipulation...258 18.7. Summary...260 Appendix A. Further reading...261 Appendix B. A 5 minute review...268 Appendix C. Tips and tricks...282 Appendix D. List of examples...289 Appendix E. Revision history...302 Appendix F. About the book...314 Appendix G. GNU Free Documentation License...315 G.0. Preamble...315 G.1. Applicability and definitions...315 G.2. Verbatim copying...316 G.3. Copying in quantity...316 G.4. Modifications...317 G.5. Combining documents...318 G.6. Collections of documents...318 G.7. Aggregation with independent works...318 iv

Appendix G. GNU Free Documentation License G.8. Translation...318 G.9. Termination...319 G.10. Future revisions of this license...319 G.11. How to use this License for your documents...319 Appendix H. Python license...320 H.A. History of the software...320 H.B. Terms and conditions for accessing or otherwise using Python...320 v