did-you-know? rent-now

Amazon no longer offers textbook rentals. We do!

did-you-know? rent-now

Amazon no longer offers textbook rentals. We do!

We're the #1 textbook rental company. Let us show you why.

9780672328626

Python Essential Reference

by
  • ISBN13:

    9780672328626

  • ISBN10:

    0672328623

  • Edition: 3rd
  • Format: Paperback
  • Copyright: 2006-01-01
  • Publisher: Sams
  • View Upgraded Edition

Note: Supplemental materials are not guaranteed with Rental or Used book purchases.

Purchase Benefits

  • Free Shipping Icon Free Shipping On Orders Over $35!
    Your order must be $35 or more to qualify for free economy shipping. Bulk sales, PO's, Marketplace items, eBooks and apparel do not qualify for this offer.
  • eCampus.com Logo Get Rewarded for Ordering Your Textbooks! Enroll Now
List Price: $44.99 Save up to $11.25
  • Buy Used
    $33.74

    USUALLY SHIPS IN 2-4 BUSINESS DAYS

Supplemental Materials

What is included with this book?

Summary

Python Essential Reference, 3rd Edition,is a comprehensive reference to the Python programming language. The focus of this latest edition is to add coverage of significant new features and new library modules added to the language over the past five years. Clearly written with concise organization, the new features covered include new style classes, unification of types and classes, xmlrpclip, intertools, bz2 and optparse, making it the most up-to-date Python book on the market.

Table of Contents

Introduction 1(4)
I. The Python Language
A Tutorial Introduction
5(14)
Running Python
5(1)
Variables and Arithmetic Expressions
6(1)
Conditionals
7(1)
File Input and Output
8(1)
Strings
9(1)
Lists
10(1)
Tuples
11(1)
Sets
12(1)
Dictionaries
12(1)
Iteration and Looping
13(1)
Functions
14(1)
Classes
15(1)
Exceptions
16(1)
Modules
17(1)
Getting Help
18(1)
Lexical Conventions and Syntax
19(8)
Line Structure and Indentation
19(1)
Identifiers and Reserved Words
20(1)
Literals
21(2)
Operators, Delimiters, and Special Symbols
23(1)
Documentation Strings
24(1)
Decorators
24(1)
Source Code Encoding
24(3)
Types and Objects
27(30)
Terminology
27(1)
Object Identity and Type
27(1)
Reference Counting and Garbage Collection
28(1)
References and Copies
29(1)
Built-in Types
30(15)
The None Type
31(1)
Numeric Types
32(1)
Sequence Types
32(4)
Mapping Types
36(2)
Set Types
38(1)
Callable Types
39(2)
Classes and Types
41(1)
Modules
41(1)
Files
42(1)
Internal Types
42(2)
Classic Classes
44(1)
Special Methods
45(9)
Object Creation, Destruction, and Representation
46(1)
Attribute Access
47(2)
Sequence and Mapping Methods
49(1)
Iteration
50(1)
Mathematical Operations
51(2)
Comparison Operations
53(1)
Callable Objects
54(1)
Performance Considerations
54(3)
Operators and Expressions
57(14)
Operations on Numbers
57(2)
Operations on Sequences
59(4)
Operations on Dictionaries
63(1)
Operations on Sets
63(1)
Augmented Assignment
64(1)
The Attribute (.) Operator
64(1)
Type Conversion
64(1)
Unicode Strings
65(3)
Boolean Expressions and Truth Values
68(1)
Object Equality and Identity
68(1)
Order of Evaluation
68(3)
Control Flow
71(8)
Conditionals
71(1)
Loops and Iteration
71(2)
Exceptions
73(3)
Defining New Exceptions
76(1)
Assertions and __debug__
77(2)
Functions and Functional Programming
79(12)
Functions
79(2)
Parameter Passing and Return Values
81(1)
Scoping Rules
82(1)
Functions as Objects
83(1)
Recursion
83(1)
The apply () Function
83(1)
The lambda Operator
84(1)
map(), zip(), reduce(), and filter()
84(1)
List Comprehensions
85(1)
Generators and yield
86(1)
Generator Expressions
87(1)
Function Decorators
88(1)
eval (), exec, execfile(), and compile()
89(2)
Classes and Object-Oriented Programming
91(12)
The class Statement
91(2)
Class Instances
93(1)
Reference Counting and Instance Destruction
94(1)
Inheritance
94(2)
Polymorphism
96(1)
Information Hiding
97(1)
Operator Overloading
97(1)
Types and Class Membership Tests
98(1)
Classic Classes
99(1)
Metaclasses
99(4)
Modules and Packages
103(8)
Modules
103(2)
The Module Search Path
105(1)
Module Loading and Compilation
105(1)
Module Reloading
106(1)
Packages
107(4)
Input and Output
111(12)
Reading Options and Environment Variables
111(1)
Files and File Objects
112(2)
Standard Input, Output, and Error
114(1)
The print Statement
115(1)
Persistence
116(1)
Unicode I/O
117(6)
Execution Environment
123(8)
Interpreter Options and Environment
123(2)
Interactive Sessions
125(1)
Launching Python Applications
126(1)
Site Configuration Files
126(1)
Enabling Future Features
126(1)
Program Termination
126(5)
II. The Python Library
Introduction to the Python Standard Library
131(4)
Library Overview
132(1)
Preview
132(3)
Built-in Functions and Exceptions
135(14)
Built in Functions
135(9)
Built-in Exceptions
144(5)
Python Runtime Services
149(32)
atexit
149(1)
code
149(2)
copy
151(1)
copy_reg
152(1)
__future__
153(1)
gc
154(1)
inspect
155(4)
marshal
159(1)
new
160(1)
operator
161(1)
pickle and cPickle
162(3)
site
165(1)
sys
166(4)
traceback
170(2)
types
172(2)
warnings
174(2)
weakref
176(2)
UserDict, UserList, and UserString
178(3)
Mathematics
181(14)
cmath
181(1)
decimal
182(8)
math
190(1)
random
191(4)
Data Structures and Algorithms
195(8)
array
195(2)
bisect
197(1)
collections
197(1)
heapq
198(1)
itertools
199(4)
String and Text Handling
203(34)
codecs
203(8)
difflib
211(2)
gettext
213(4)
re
217(7)
string
224(3)
StringIO and cStringIO
227(1)
struct
228(2)
textwrap
230(1)
unicodedata
231(6)
Data Management and Object Persistence
237(8)
Introduction
237(1)
anydbm
238(1)
bsddb
238(1)
dbhash
239(1)
dbm
240(1)
dumbdbm
240(1)
gdbm
241(1)
shelve
242(1)
whichdb
243(2)
File Handling
245(20)
bz2
245(1)
csv
246(3)
filecmp
249(2)
fileinput
251(1)
fnmatch
252(1)
glob
253(1)
gzip
253(1)
tarfile
254(4)
zipfile
258(3)
zlib
261(4)
Operating System Services
265(90)
commands
265(1)
crypt
266(1)
datetime
267(6)
dl
273(2)
errno
275(5)
fcntl
280(2)
getopt
282(1)
getpass
283(1)
grp
283(1)
locale
284(3)
logging
287(11)
mmap
298(3)
msvcrt
301(1)
optparse
302(6)
os
308(18)
os.path
326(3)
platform
329(2)
popen2
331(1)
pwd
332(1)
resource
333(2)
shutil
335(1)
signal
336(2)
stat
338(1)
statvfs
339(1)
subprocess
340(2)
tempfile
342(2)
termios
344(4)
time
348(3)
tty
351(1)
__winreg
351(4)
Threads
355(10)
Thread Basics
355(1)
Python Threads
355(1)
thread
356(2)
threading
358(5)
Queue
363(2)
Network Programming
365(28)
Introduction
365(3)
asynchat
368(2)
asyncore
370(4)
select
374(1)
socket
375(13)
SocketServer
388(5)
Internet Application Protocols
393(52)
BaseHTTPServer
393(3)
cgi
396(5)
cgitb
401(1)
CGIHTTPServer
402(1)
Cookie
402(3)
cookielib
405(5)
DocXMLRPCServer
410(1)
encodings.idna
411(1)
ftplib
412(3)
httplib
415(7)
imaplib
422(1)
nntplib
422(4)
poplib
426
robotparser
128(300)
SimpleHTTPServer
428(1)
SimpleXMLRPCServer
429(3)
smtplib
432(1)
urllib
433(2)
urllib2
435(5)
urlparse
440(1)
webbrowser
441(1)
xmlrpclib
442(3)
Internet Data Handling and Encoding
445(50)
base64
445(2)
binascii
447(2)
binhex
449(1)
email
449(12)
HTMLParser
461(2)
mailcap
463(1)
mimetypes
464(5)
quopri
469(1)
rfc822
470(3)
uu
473(1)
xdrlib
473(4)
xml
477(1)
xml.dom
477(4)
xml.dom.minidom
481(6)
xml.sax
487(6)
xml.sax.saxutils
493(2)
Cryptographic Services
495(4)
hmac
495(1)
md5
496(1)
sha
497(2)
Miscellaneous Modules
499(4)
Python Services
499(1)
String Processing
500(1)
Operating System Modules
500(1)
Network
500(1)
Internet Data Handling
501(1)
Multimedia Services
501(1)
Miscellaneous
502(1)
Debugging, Profiling, and Testing
503(16)
doctest
503(2)
hotshot
505(1)
pdb
506(4)
profile
510(1)
pstats
511(1)
timeit
512(1)
unittest
513(6)
III. Extending and Embedding
Extending and Embedding Python
519(30)
Extension Module Example
519(2)
Compilation of Extensions
521(2)
Converting Data from Python to C
523(3)
Converting Data from C to Python
526(2)
Error Handling
528(3)
Reference Counting
531(1)
Calling Python from C
532(1)
Abstract Object Layer
533(4)
Low-level Functions on Built-in Types
537(6)
Threads
543(1)
Embedding
544(2)
Defining New Python Types
546(1)
Extension Building Tools
546(3)
Index 549

Supplemental Materials

What is included with this book?

The New copy of this book will include any supplemental materials advertised. Please check the title of the book to determine if it should include any access cards, study guides, lab manuals, CDs, etc.

The Used, Rental and eBook copies of this book are not guaranteed to include any supplemental materials. Typically, only the book itself is included. This is true even if the title states it includes any access cards, study guides, lab manuals, CDs, etc.

Excerpts

= 0) {slash = '\\';} else {slash = '/';}openLoc = figLoc.substring(0, figLoc.lastIndexOf(slash) + 1);while (pPage.substring(0,3) == '../') {openLoc = openLoc.substring(0, openLoc.lastIndexOf(slash, openLoc.length - 2)+ 1);pPage = pPage.substring(3, pPage.length + 1);}popUpWin =window.open('','popWin','resizable=1,scrollbars=1,location=0,toolbar=0,width=525,height=394');figDoc = popUpWin.document;zhtm= ' ' + pPage + ' ';zhtm += ' ';zhtm += ' ';zhtm += ' ';zhtm += '' + pPage.substring(pPage.lastIndexOf('/') + 1, pPage.length) + '';zhtm += ' ';figDoc.write(zhtm);figDoc.close();}// modified 3.1.99 RWE v4.1 --> Introduction IntroductionTHIS BOOK IS INTENDED TO BE A CONCISE REFERENCE to the Python programming language. Although an experienced programmer will probably be able to learn Python from this book, it's not intended to be an extended tutorial or a treatise on how to program. Rather, the goal is to present the core Python language, the contents of the Python library, and the Python extension API in a manner that's accurate and concise. This book assumes that the reader has prior programming experience with Python or another language such as C or Java. In a addition, a general familiarity with systems programming topics (for example, basic operating system concepts and network programming) may be useful in understanding certain parts of the library reference.Python is freely available for download at http://www.python.org . Versions are available for almost every operating system, including UNIX, Windows, Macintosh, and Java. In addition, the Python website includes links to documentation, how-to guides, and a wide assortment of third-party software.The contents of this book are based on Python 2.4. However, readers should be aware that Python is a constantly evolving language. Most of the topics described herein are likely to be applicable to future versions of Python 2.x. In addition, much of the material is applicable to earlier releases. To a lesser extent, the topics in this book also apply to alternative Python implementations such as Jython (an implementation of Python in Java) and IronPython (an implementation of Python for .NET). However, those implementations are not the primary focus.Just as Python is an evolving language, the third edition ofPython Essential Referencehas evolved to make use of new language features and new library modules. In fact, since the publication of the second edition, Python has undergone a dramatic transformation involving significant changes to core parts of the language. In addition, a wide variety of new and interesting features have been added. Rather than discussing these changes as a mere afterthought, th

Rewards Program