Log In
Or create an account ->
Imperial Library
Home
About
News
Upload
Forum
Help
Login/SignUp
Index
Python Pocket Reference
1. Python Pocket Reference
Introduction
Book Conventions
Python Command-Line Usage
Python Command Options
Command-Line Program Specification
Python 2.X Command Options
Python Environment Variables
Operational Variables
Python Command Option Variables
Python Windows Launcher Usage
Launcher File Directives
Launcher Command Lines
Launcher Environment Variables
Built-in Types and Operators
Operators and Precedence
Atomic terms and dynamic typing
Operator Usage Notes
Operations by Category
Sequence Operation Notes
Specific Built-in Types
Numbers
Literals and creation
Operations
Decimal and fraction
Other numeric types
Strings
Literals and creation
Operations
String formatting
String formatting expression
Formatting expression syntax
String formatting method
Formatting method syntax
Template string substitution
String methods
byte and bytearray methods
Searching methods
Splitting and joining methods
Formatting methods
Content test methods
The original string module
Unicode Strings
Unicode support in Python 3.X
byte and bytearray strings
Unicode support in Python 2.X
Lists
Literals and creation
Operations
List comprehension expressions
The iteration protocol
Generator expressions
Other comprehension expressions
Dictionaries
Literals and creation
Operations
Tuples
Literals and creation
Operations
Files
Input files
Output files
Any files
Other file attributes (some read-only)
File context managers
File usage notes
Sets
Literals and creation
Operations
Other Types and Conversions
Boolean
Type Conversions
Statements and Syntax
Syntax Rules
Name Rules
Name format
Name conventions
Specific Statements
The Assignment Statement
Augmented assignment
Normal sequence assignment
Extended sequence assignment (3.X)
The Expression Statement
Call syntax
Arbitrary arguments call syntax
The print Statement
Python 2.X print statements
The if Statement
The while Statement
The for Statement
The pass Statement
The break Statement
The continue Statement
The del Statement
The def Statement
Python 3.X keyword-only arguments
Python 3.X function annotations
lambda expressions
Function defaults and attributes
Function and method decorators
The return Statement
The yield Statement
Generator function changes in Python 3.3
The global Statement
The nonlocal Statement
The import Statement
Package imports
Python 3.3 namespace packages
Import algorithm
The from Statement
Package relative import syntax
The class Statement
Class decorators in Python 3.X, 2.6, and 2.7
Metaclasses
The try Statement
Python 2.X try statement forms
The raise Statement
Python 3.X chained exceptions
Class exceptions
Python 2.X raise statement forms
The assert Statement
The with Statement
Multiple context managers in Python 3.1 and 2.7
Context manager protocol
Python 2.X Statements
Namespace and Scope Rules
Qualified Names: Object Namespaces
Unqualified Names: Lexical Scopes
Nested Scopes and Closures
Enclosing scopes and defaults
Object-Oriented Programming
Classes and Instances
Class objects provide default behavior
Instance objects are generated from classes
Inheritance rules
Pseudoprivate Attributes
Module privates
Class privates
New-Style Classes
Formal Inheritance Rules
Classic classes: DFLR
New-style classes: MRO
Example: nondiamonds
Example: diamonds
New-style inheritance algorithm
New-style precedence and context
Operator Overloading Methods
Methods for All Types
Methods for Collections (Sequences, Mappings)
Methods for Numbers (Binary Operators)
Basic binary methods
Right-side binary methods
Augmented binary methods
Methods for Numbers (Other Operations)
Methods for Descriptors
Methods for Context Managers
Python 2.X Operator Overloading Methods
Methods in Python 3.X only
Methods in Python 2.X only
Built-in Functions
Python 2.X Built-in Functions
Python 3.X built-ins not supported by Python 2.X
Python 2.X built-ins not supported by Python 3.X
Built-in Exceptions
Superclasses: Categories
Specific Exceptions
Specific OSError Exceptions
Warning Category Exceptions
Warnings Framework
Python 3.2 Built-in Exceptions
Python 2.X Built-in Exceptions
Built-in Attributes
Standard Library Modules
The sys Module
The string Module
Functions and Classes
Constants
The os System Module
Administrative Tools
Portability Constants
Shell Commands
Environment Tools
File Descriptor Tools
File Pathname Tools
Process Control
The os.path Module
The re Pattern-Matching Module
Module Functions
Regular Expression Objects
Match Objects
Pattern Syntax
Object Persistence Modules
The shelve and dbm Modules
File opens
File operations
The pickle Module
Pickling interfaces
Unpickling interfaces
pickle usage notes
The tkinter GUI Module and Tools
tkinter Example
tkinter Core Widgets
Common Dialog Calls
Module tkinter.messagebox (tkMessageBox in Python 2.X)
Module tkinter.simpledialog (tkSimpleDialog in Python 2.X)
Module tkinter.colorchooser (tkColorChooser in Python 2.X)
Module tkinter.filedialog (tkFileDialog in Python 2.X)
Additional tkinter Classes and Tools
Tcl/Tk-to-Python/tkinter Mappings
Internet Modules and Tools
Other Standard Library Modules
The math Module
The time Module
The timeit Module
The datetime Module
The random Module
The json Module
The subprocess Module
The enum Module
The struct Module
Threading Modules
Python SQL Database API
API Usage Example
Module Interface
Connection Objects
Cursor Objects
Type Objects and Constructors
More Hints and Idioms
Core Language Hints
Environment Hints
Usage Hints
Assorted Hints
Index
Copyright
← Prev
Back
Next →
← Prev
Back
Next →