Beginning Python - From Novice to Professional
Beginning Python - From Novice to Professional Beginning Python - From Novice to Professional
■INDEX 597 ■S safe_substitute method 55 sample function random module 228 saving programs 19–20 SAX parser 422 processing XML files 421 workings of 424 scoping 126–127 nested scopes 128 rebinding global variables 127 screen scraping Beautiful Soup module 319–320 HTMLParser 318–319 introduction 313–314 Tidy 314 getting Tidy library 316 introduction 315–316 using command-line Tidy 317 XHTML 317 sdist command 376 search function re module 239 security CGI security risks 323 seek method file object 260 select function asynchronous I/O 306, 307 select module 304, 456 select module polling event constants 307 select function 304, 456 self parameter 149 Self-Defense Against Fresh Fruit 527 sep variable os module 217 sequence multiplication example 38–39 sequence unpacking assignment statements 83–84 popitem method 84 sequences common sequence operations 32 adding sequences 37 indexing 33–34 length, minimum, and maximum 40 longer steps 36–37 membership 39–40 multiplication 37 None, empty lists, and initialization 38 shortcut 35 slicing sequences 34–35 introduction 31–32 serve_forever method SimpleXMLRPCServer class 501 ServerProxy object 338 Set class add method 223 remove method 223 sets module 221–223 union method 222 set_caption function pygame.display module 529 set_mode function pygame.display module 529, 531 set_terminator method async_chat class 460–461 set_visible function pygame.mouse module 531 setattr function 561 setdefault method dictionaries 76, 102 setdefaultencoding function sys module 436 setinputsizes method cursor objects 289
598 ■INDEX setoutputsize method cursor objects 289 sets module frozenset type 223 Set class 221–223 set type 221 SetSizer method wx.Panel class 276 sha module 251 password handling 478–479 shadowing 127 shebang 21 Shelve class close method 231 shelve module 285 example 232–235 introduction 231 open function 231 potential problem 231–232 Show method wx.Frame class 273 shuffle() function random module 228 Simple API for XML. See SAX simple statements 566 Simple Wrapper and Interface Generator. See SWIG SimpleWebSource class creating 447 SimpleXMLRPCServer class allow_reuse_address attribute 509 handling of exceptions 337 register_function method 501 register_instance method 501, 505 registering Node with 503 serve_forever method 501 SimpleXMLRPCServer module 302, 501, 573 importing 501 single-quoted strings 23–24 Slashdot as example of bulletin board 483 sleep function time module 227 slice assignments assigning lists to slices 42 inserting elements 42 slicing lists 548 slicing sequences 34–35 SmallTalk language privacy of object state 145 smtpd module 302 smtplib module 302 socket class bind method 298 listen method 298 socket module 298 socket module gethostname function 298 network programming 298 socket class 298 SocketServer class 297 SocketServer module classes 303 forking and threading 305 network programming 302–303 sort method 47, 48, 98 advanced sorting 48, 49 sorted function 98, 561 Sorting Mini-HOWTO 49 Andrew Dalke 49 span method Match Objects 242 special characters character sets 237 parsing in XML files 436 split method 63 Join as inverse of 61–62
- 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 610 and 611: ■INDEX 579 cmd module 252, 501 Cm
- 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 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 />
597<br />
■S<br />
safe_substitute method 55<br />
sample function<br />
random module 228<br />
saving programs 19–20<br />
SAX<br />
parser 422<br />
processing XML files 421<br />
workings of 424<br />
scoping 126–127<br />
nested scopes 128<br />
rebinding global variables 127<br />
screen scraping<br />
Beautiful Soup module 319–320<br />
HTMLParser 318–319<br />
introduction 313–314<br />
Tidy 314<br />
getting Tidy library 316<br />
introduction 315–316<br />
using command-line Tidy 317<br />
XHTML 317<br />
sdist command 376<br />
search function<br />
re module 239<br />
security<br />
CGI security risks 323<br />
seek method<br />
file object 260<br />
select function<br />
asynchronous I/O 306, 307<br />
select module 304, 456<br />
select module<br />
polling event constants 307<br />
select function 304, 456<br />
self parameter 149<br />
Self-Defense Against Fresh Fruit 527<br />
sep variable<br />
os module 217<br />
sequence multiplication example 38–39<br />
sequence unpacking<br />
assignment statements 83–84<br />
popitem method 84<br />
sequences<br />
common sequence operations 32<br />
adding sequences 37<br />
indexing 33–34<br />
length, minimum, and maximum 40<br />
longer steps 36–37<br />
membership 39–40<br />
multiplication 37<br />
None, empty lists, and initialization 38<br />
shortcut 35<br />
slicing sequences 34–35<br />
introduction 31–32<br />
serve_forever method<br />
SimpleXMLRPCServer class 501<br />
ServerProxy object 338<br />
Set class<br />
add method 223<br />
remove method 223<br />
sets module 221–223<br />
union method 222<br />
set_caption function<br />
pygame.display module 529<br />
set_mode function<br />
pygame.display module 529, 531<br />
set_termina<strong>to</strong>r method<br />
async_chat class 460–461<br />
set_visible function<br />
pygame.mouse module 531<br />
setattr function 561<br />
setdefault method<br />
dictionaries 76, 102<br />
setdefaultencoding function<br />
sys module 436<br />
setinputsizes method<br />
cursor objects 289