Log In
Or create an account ->
Imperial Library
Home
About
News
Upload
Forum
Help
Login/SignUp
Index
Python Pocket Reference
SPECIAL OFFER: Upgrade this ebook with O’Reilly
1. Python Pocket Reference
Introduction
Conventions
Using Code Examples
Safari® Books Online
Command-Line Options
Python Options
Program Specification
Environment Variables
Operational Variables
Command-Line Option Variables
Built-in Types and Operators
Operators and Precedence
Operator Usage Notes
Operations by Category
Sequence Operation Notes
Indexing: S[i]
Slicing: S[i:j]
Slicing: S[i:j:k]
Other
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
String formatting method
Template string substitution
String methods
byte and bytearray methods
Searching
Splitting and joining
Formatting
Content tests
The original string module
Unicode Strings
Unicode support in Python 3.0
byte and bytearray strings
Unicode support in Python 2.X
Lists
Literals and creation
Operations
List comprehension expressions
Generator expressions
Other generators and comprehensions
Dictionaries
Literals and creation
Operations
Tuples
Literals
Operations
Files
Input files
Output files
Any files
Attributes (all read-only)
File context managers
Notes
Sets
Literals and creation
Operations
Other Common Types
Boolean
Type Conversions
Statements and Syntax
Syntax Rules
Name Rules
Name format
Name conventions
Specific Statements
The Assignment Statement
Augmented assignment
Normal and extended sequence assignment
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.0 keyword-only arguments
Python 3.0 function annotations
lambda expressions
Defaults and attributes
Function and method decorators
The return Statement
The yield Statement
Generators and iterators
The global Statement
The nonlocal Statement
The import Statement
Package imports
The from Statement
Package relative import syntax
The class Statement
Class decorators in Python 2.6 and 3.0
Metaclasses
The try Statement
Python 2.X try statement forms
The raise Statement
Class exceptions
Python 2.X raise statement forms
The assert Statement
The with Statement
Multiple context managers in Python 3.1
Python 2.X Statements
Namespace and Scope Rules
Qualified Names: Object Namespaces
Unqualified Names: Lexical Scopes
Statically Nested Scopes
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
Operator Overloading Methods
For All Types
For Collections (Sequences, Mappings)
For Numbers (Binary Operators)
Basic binary methods
Right-side binary methods
Augmented binary methods
For Numbers (Other Operations)
For Descriptors
For Context Managers
Python 2.X Operator Overloading Methods
Methods in Python 3.0 only
Methods in Python 2.X only
Built-in Functions
Python 2.X Built-in Functions
Python 3.0 built-ins not supported by Python 2.6
Python 2.6 built-ins not supported by Python 3.0
Built-in Exceptions
Superclasses (Categories)
Specific Exceptions Raised
Warning Category Exceptions
Warnings Framework
Python 2.X Built-in Exceptions
Built-in Attributes
Standard Library Modules
The sys Module
The string Module
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
dbm and shelve Modules
pickle Module
Pickling interfaces
Unpickling interfaces
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
Commonly Used Library Modules
Other Standard Library Modules
The math Module
The time Module
The datetime Module
Threading Modules
Binary Data Parsing
Python Portable SQL Database API
API Usage Example
Module Interface
Connection Objects
Cursor Objects
Type Objects and Constructors
Python Idioms and Hints
Core Language Hints
Environment Hints
Usage Hints
Assorted Hints
Index
About the Author
SPECIAL OFFER: Upgrade this ebook with O’Reilly
← Prev
Back
Next →
← Prev
Back
Next →