Beginning Python - From Novice to Professional

Beginning Python - From Novice to Professional Beginning Python - From Novice to Professional

16.01.2014 Views

■INDEX 603 further exploration 472 goals 455 preparations 456–457 problem 455 second implementation 463 basic command interpretation 463–464 login and logout rooms 465 main chat room 466 new server 466–472 rooms 464–465 tools 456 ■W Warning exception class 287 warnings exceptions as 159 Weave tool speeding up programs 361 Web programming dynamic pages with CGI 321 adding the Pound Bang line 321–322 CGI security risks 323 debugging with cgitb 324 preparing the Web server 321 setting file permissions 322 simple CGI script 323–324 simple form 327–328 using cgi module 325–326 mod_python 328 CGI handler 330–331 configuring Apache 330 installing 329 installing on Unix 329 installing on Windows 329 PSP 331–332 Publisher 332–334 screen scraping 313–314 Beautiful Soup module 319–320 HTMLParser 318–319 Tidy 314–317 Web services 335 RSS 335–336 XML-RPC 337–338 Web services RSS 335–336 scraping 335 XML-RPC 337–338 webbrowser module open function 218 while loops 94, 569 using readline method, file object 264 while True/break idiom 99–100 win32all 571 Windows installing Python 1–2 setting environment variables 209 wininst format Distutils installer 378 Wise installer installing Distutils toolkit 378 write method file object 258 stdout class 310 writeline method file object 260, 261 wx constructors using keyword arguments 274 wx module importing 272 style facets 276 wx.App class 272, 518 MainLoop method 273 wx.BoxSizer class 276 wx.Button class adding button to frame 273 wx.Frame class Show method 273 windows as instances of 273

604 ■INDEX wx.Panel class SetSizer method 276 wxPython GUI toolkit 271, 573 adding GUI to files 517 downloading and installing 271–272 event handling 278 finished program 278–280 getting started 272 labels and positions 274–276 layout 276–277 writing programs 273 ■X XHTML reasons for using 317 XML files parsing 421–422 special characters 436 XML for all occasions project 421 first implementation 424 creating a simple content handler 425–427 creating HTML pages 428–429 further exploration 437 goals 422 parsing XML files 421–422 preparations 423–424 second implementation 430 dispatcher mix-in class 430–432 event handlers 433–436 factoring out header, footer, and default handling 432 support for directories 432–433 tools 422 xml.sax module parse function 425 xml.sax.handler module ContentHandler class 425 XML-RPC file sharing with 499–516 introduction 337–338 xmlrpclib module 302, 337, 501 Fault class 510 importing 501 xrange function 562 xreadlines method file object 263 lazy line iteration 265 ■Y yield statements 192, 194, 567 ■Z Zawinski, Jamie 235 ZeroDivisionError class 159, 161, 555 catching with except clause 164 exceptions 168 muffling 163 zero-padding 58 zip function 562 parallel iteration 97 Zope 313

604 ■INDEX<br />

wx.Panel class<br />

SetSizer method 276<br />

wx<strong>Python</strong> GUI <strong>to</strong>olkit 271, 573<br />

adding GUI <strong>to</strong> files 517<br />

downloading and installing 271–272<br />

event handling 278<br />

finished program 278–280<br />

getting started 272<br />

labels and positions 274–276<br />

layout 276–277<br />

writing programs 273<br />

■X<br />

XHTML<br />

reasons for using 317<br />

XML files<br />

parsing 421–422<br />

special characters 436<br />

XML for all occasions project 421<br />

first implementation 424<br />

creating a simple content handler<br />

425–427<br />

creating HTML pages 428–429<br />

further exploration 437<br />

goals 422<br />

parsing XML files 421–422<br />

preparations 423–424<br />

second implementation 430<br />

dispatcher mix-in class 430–432<br />

event handlers 433–436<br />

fac<strong>to</strong>ring out header, footer, and default<br />

handling 432<br />

support for direc<strong>to</strong>ries 432–433<br />

<strong>to</strong>ols 422<br />

xml.sax module<br />

parse function 425<br />

xml.sax.handler module<br />

ContentHandler class 425<br />

XML-RPC<br />

file sharing with 499–516<br />

introduction 337–338<br />

xmlrpclib module 302, 337, 501<br />

Fault class 510<br />

importing 501<br />

xrange function 562<br />

xreadlines method<br />

file object 263<br />

lazy line iteration 265<br />

■Y<br />

yield statements 192, 194, 567<br />

■Z<br />

Zawinski, Jamie 235<br />

ZeroDivisionError class 159, 161, 555<br />

catching with except clause 164<br />

exceptions 168<br />

muffling 163<br />

zero-padding 58<br />

zip function 562<br />

parallel iteration 97<br />

Zope 313

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!