Preface
Part I. Getting Started
1. Picking an Interpreter
The State of Python 2 Versus Python 3
Recommendations
So...3?
Implementations
CPython
Stackless
PyPy
Jython
IronPython
PythonNet
Skulpt
MicroPython
2. Properly Installing Python
Installing Python on Mac OS X
Setuptools and pip
virtualenv
Installing Python on Linux
Setuptools and pip
Development Tools
virtualenv
Installing Python on Windows
Setuptools and pip
virtualenv
Commercial Python Redistributions
3. Your Development Environment
Text Editors
Sublime Text
Vim
Emacs
TextMate
Atom
Code
IDEs
PyCharm/Intellij IDEA
Aptana Studio 3/Eclipse + LiClipse + PyDev
WingIDE
Spyder
NIN]A-IDE
Komodo IDE
Eric (the Eric Python IDE)
Visual Studio
Enhanced Interactive Tools
IDLE
IPython
bpython
Isolation Tools
Virtual Environments
pyenv
Autoenv
virtualenvwrapper
Buildout
Conda
Docker
Part II. Getting Down to Business
4. Writing Great Code
Code Style
PEP 8
PEP 20 (a.k.a(chǎn). The Zen of Python)
General Advice
Conventions
Idioms
Common Gotchas
Structuring Your Project
Modules
Packages
Object-Oriented Programming
Decorators
Dynamic Typing
Mutable and Immutable Types
Vendorizing Dependencies
Testing Your Code
Testing Basics
Examples
Other Popular Tools
Documentation
Project Documentation
Project Publication
Docstring Versus Block Comments
Logging
Logging in a Library
Logging in an Application
Choosing a License
Upstream Licenses
Options
Licensing Resources
5. Reading Great Code
Common Features
HowDoI
Reading a Single-File Script
Structure Examples from HowDoI
Style Examples from HowDoI
Diamond
Reading a Larger Application
Structure Examples from Diamond
Style Examples from Diamond
Tablib
Reading a Small Library
Structure Examples from Tablib
Style Examples from Tablib
Requests
Reading a Larger Library
Structure Examples from Requests
Style Examples from Requests
Werkzeug
Reading Code in a Toolkit
Style Examples from Werkzeug
Structure Examples from Werkzeug
Flask
Reading Code in a Framework
Style Examples from Flask
Structure Examples from Flask
6. Shipping Great Code
Useful Vocabulary and Concepts
Packaging Your Code
Conda
VyPI
Freezing Your Code
PyInstaller
cx_Freeze
py2app
py2exe
bbFreeze
Packaging for Linux-Built Distributions
Executable ZIP Files
PartIII. Scenario Guide
7. User Interaction
Iupyter Notebooks
Command-Line Applications
GUI Applications
Widget Libraries
Game Development
Web Applications
Web Frameworks/Microframeworks
Web Template Engines
Web Deployment
8. Code Management and Improvement
Continuous Integration
System Administration
Server Automation
System and Task Monitoring
Speed
Interfacing with C/C++/FORTRAN Libraries
9. Software interfaces
Web Clients
Web APIs
Data Serialization
Distributed Systems
Networking
Cryptography
10. Data Manipulation
Scientific Applications
Text Manipulation and Text Mining
String Tools in Pythons Standard Library
Image Manipulation
11. Data Persistence
Structured Files
Database Libraries
A. Additional Notes
Index