Beginning Python - From Novice to Professional
Beginning Python - From Novice to Professional Beginning Python - From Novice to Professional
■INDEX 579 cmd module 252, 501 Cmd class 463–464, 509 cmp function 89, 559 code coverage testing 343 collect_incoming_data method async_chat class 460–461 collections module deque type 225–226 command interpretation, modeling Cmd class 463–464 command prompt running scripts from 20 CommandHandler class creating rooms 464–465 command-line tools using with subprocess module 352 comments 22, 112 commit method connection object 288, 486 Common Gateway Interface. See CGI comp.lang.python Usenet group 573 comp.lang.python.announce Usenet group 573 comparison operators 89 chaining 89 comparing strings and sequences 91 equality operator 89 identity operator (is) 90, 91 membership operator (in) 91 compile function re module 239 complex function 559 compound statements 569 concatenation sequences with plus sign + 551 strings 24 condition method rule objects 400, 401 conditional execution if Statements 87 conditional statements 86–87 elif clauses 88 else clauses 87 if statements 87 nesting blocks 88 conditions 86, 87 assertions 93 boolean statements 91–92 comparison operators 89–91 ConfigParser module 384 configuration 383 configuration files 384–385 extracting constants 383–384 conflict function 197 connect function common parameters 287 connection object methods 288 close method 486 commit method 486 cursor method 486 constructors 174 calling unbound superclass constructor 177–178 creating 174–175 overriding 175–177 super function 178–179 ContentHandler class xml.sax.handler module 425 continue statements 99, 568 conversion specifiers 54 anatomy 56 field width 57–58 precision 57 tuples 55 convert function 292 Cookie module 302
580 ■INDEX cookie-cutter code automating 367–368 cookielib module 302 copy method dictionaries 73, 74 Cormen, Thomas H. et al Introduction to Algorithms 387 count method lists 43 CREATE TABLE command 485 create_socket method dispatcher class 458 ctypes tool speeding up programs 361 cursor function 288 cursor object attributes 289 methods 288 dictfetchall method 487, 488 dictfetchone method 486 execute method 486 fetchall method 486, 488 fetchone method 486 cursor method connection object 288, 486 custom exception classes 162 ■D Dalke, Andrew Sorting Mini-HOWTO 49 data structures 31 sequences 31 database application example 291–292 creating and populating tables 292–293 searching and dealing with results 294–295 database support 285 database application example 291–292 creating and populating tables 292–293 searching and dealing with results 294–295 Python Database API 285 connections and cursors 287–289 exceptions 287 global variables 286 types 289 DatabaseError exception class 287 DataError exception class 287 datetime module 227, 251 deallocating objects 366 Debian Linux installing Python 5 def statements 194, 549 commenting 112 defining functions 549 defining generator-function 194 default arguments 550 parameters 120 del statements 42, 103, 104, 168, 567 delattr function 559 deque type collections module 225–226 description attribute cursor objects 289 Design Patterns Gang of Four 387 dict function 69, 559 dictfetchall() method cursor object 487, 488 dictfetchone() method cursor object 486 dictionaries 67 basic operations 69–70 telephone book example 70–71 creating 549 iterating over 96 methods 72, 562 clear method 72–73 copy method 73–74 fromkeys method 74
- Page 560 and 561: CHAPTER 29 ■ PROJECT 10: DO-IT-YO
- Page 562 and 563: CHAPTER 29 ■ PROJECT 10: DO-IT-YO
- Page 564 and 565: CHAPTER 29 ■ PROJECT 10: DO-IT-YO
- Page 566 and 567: CHAPTER 29 ■ PROJECT 10: DO-IT-YO
- Page 568 and 569: CHAPTER 29 ■ PROJECT 10: DO-IT-YO
- Page 570 and 571: CHAPTER 29 ■ PROJECT 10: DO-IT-YO
- Page 572 and 573: CHAPTER 29 ■ PROJECT 10: DO-IT-YO
- Page 574 and 575: CHAPTER 29 ■ PROJECT 10: DO-IT-YO
- Page 576 and 577: CHAPTER 29 ■ PROJECT 10: DO-IT-YO
- Page 578 and 579: APPENDIX A ■ ■ ■ The Short Ve
- Page 580 and 581: APPENDIX A ■ THE SHORT VERSION 54
- Page 582 and 583: APPENDIX A ■ THE SHORT VERSION 55
- Page 584 and 585: APPENDIX A ■ THE SHORT VERSION 55
- Page 586: APPENDIX A ■ THE SHORT VERSION 55
- Page 589 and 590: 558 APPENDIX B ■ PYTHON REFERENCE
- Page 591 and 592: 560 APPENDIX B ■ PYTHON REFERENCE
- Page 593 and 594: 562 APPENDIX B ■ PYTHON REFERENCE
- Page 595 and 596: 564 APPENDIX B ■ PYTHON REFERENCE
- Page 597 and 598: 566 APPENDIX B ■ PYTHON REFERENCE
- Page 599 and 600: 568 APPENDIX B ■ PYTHON REFERENCE
- Page 601 and 602: 570 APPENDIX B ■ PYTHON REFERENCE
- Page 603 and 604: 572 APPENDIX C ■ ONLINE RESOURCES
- Page 606 and 607: Index ■Symbols - operator 558 !=
- Page 608 and 609: ■INDEX 577 assertEqual method Tes
- Page 612 and 613: ■INDEX 581 get method 74-75 has_k
- Page 614 and 615: ■INDEX 583 ■F Factory class twi
- Page 616 and 617: ■INDEX 585 finding conflicts 197
- Page 618 and 619: ■INDEX 587 initialization 38 nami
- Page 620 and 621: ■INDEX 589 localtime function tim
- Page 622 and 623: ■INDEX 591 nesting blocks 88 Netw
- Page 624 and 625: ■INDEX 593 playful programming 38
- Page 626 and 627: ■INDEX 595 Python C API 365 hand-
- Page 628 and 629: ■INDEX 597 ■S safe_substitute m
- Page 630 and 631: ■INDEX 599 split function re modu
- Page 632 and 633: ■INDEX 601 TestCase class methods
- Page 634 and 635: ■INDEX 603 further exploration 47
- Page 641: forums.apress.com FOR PROFESSIONALS
■INDEX<br />
579<br />
cmd module 252, 501<br />
Cmd class 463–464, 509<br />
cmp function 89, 559<br />
code coverage<br />
testing 343<br />
collect_incoming_data method<br />
async_chat class 460–461<br />
collections module<br />
deque type 225–226<br />
command interpretation, modeling<br />
Cmd class 463–464<br />
command prompt<br />
running scripts from 20<br />
CommandHandler class<br />
creating rooms 464–465<br />
command-line <strong>to</strong>ols<br />
using with subprocess module 352<br />
comments 22, 112<br />
commit method<br />
connection object 288, 486<br />
Common Gateway Interface. See CGI<br />
comp.lang.python Usenet group 573<br />
comp.lang.python.announce Usenet<br />
group 573<br />
comparison opera<strong>to</strong>rs 89<br />
chaining 89<br />
comparing strings and sequences 91<br />
equality opera<strong>to</strong>r 89<br />
identity opera<strong>to</strong>r (is) 90, 91<br />
membership opera<strong>to</strong>r (in) 91<br />
compile function<br />
re module 239<br />
complex function 559<br />
compound statements 569<br />
concatenation<br />
sequences with plus sign + 551<br />
strings 24<br />
condition method<br />
rule objects 400, 401<br />
conditional execution<br />
if Statements 87<br />
conditional statements 86–87<br />
elif clauses 88<br />
else clauses 87<br />
if statements 87<br />
nesting blocks 88<br />
conditions 86, 87<br />
assertions 93<br />
boolean statements 91–92<br />
comparison opera<strong>to</strong>rs 89–91<br />
ConfigParser module 384<br />
configuration 383<br />
configuration files 384–385<br />
extracting constants 383–384<br />
conflict function 197<br />
connect function<br />
common parameters 287<br />
connection object<br />
methods 288<br />
close method 486<br />
commit method 486<br />
cursor method 486<br />
construc<strong>to</strong>rs 174<br />
calling unbound superclass construc<strong>to</strong>r<br />
177–178<br />
creating 174–175<br />
overriding 175–177<br />
super function 178–179<br />
ContentHandler class<br />
xml.sax.handler module 425<br />
continue statements 99, 568<br />
conversion specifiers 54<br />
ana<strong>to</strong>my 56<br />
field width 57–58<br />
precision 57<br />
tuples 55<br />
convert function 292<br />
Cookie module 302