Beginning Python - From Novice to Professional

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

16.01.2014 Views

■INDEX 595 Python C API 365 hand-coded palindrome module 369–370 python command 3 Python Cookbook Alex Martelli 93 Python Database API 285 connections and cursors 287–289 exceptions 287 global variables 286 types 289 constructors and special values 289 Python functions 112–113 Python Server Pages 331–332 python-list@python.org mailing list 573 PYTHONPATH environment variable including module directory in 208 PythonWin GUI toolkit 271, 573 P Y X package 412 PyXML module 573 ■Q -Qnew command-line switch 11 quote function urllib module 301 quote_plus function urllib module 301 ■R Raggett, Dave Getting Started with HTML 391 raise statement catching exceptions 163 examples of using with Exception class 160–161 raise statements 568 random module 501 examples 229–231 introduction 228 random function random module 228 randomString function 510 randrange function random module 228 range function 561 checking for arguments 213 for loops 548 raw strings 27–28 raw_input 23 compared to input 26 raw_input function 241, 548, 561 rawDataReceived event handler 310 Raymond, Eric S. Art of UNIX Programming, The 387 RDF Site Summary. See RSS re module content of 238–241 examples 244–251 importing 160 MatchObjects and groups 241 support for regular expressions 235 using group numbers and functions in substitutions 242–243 read method file object 258 readline method file object 260–261 using in a while loop 264 Really Simple Syndication. See RSS recursion 129 binary search 131–133 factorial and power 130–131 parts 129–130 recursive generators 192–193 making safer 193–194 reduce function 135, 136, 137, 561 Refactoring Kent Beck et al 387 refactoring, description 439 reference counting 366–367

596 ■INDEX regex module importing 159 register_function method SimpleXMLRPCServer class 501 register_instance method SimpleXMLRPCServer class 501 regular expressions alternatives and subpatterns 237 beginning and end of string 238 changing plain text to markup 391 character sets 236 content of re module 238–241 escaping special characters 236 introduction 235 optional and repeated subpatterns 237–238 support for in re module 235 wildcard 236 reload function 561 remote editing with CGI project 473 first implementation 474–475 further exploration 481 goals 473–474 preparations 474 problem 473 second implementation 476 edit.cgi 476–478 index.html 476 running the editor 479–481 save.cgi 478–479 tools 474 remove method lists 46 Set class 223 RenderUpdates class draw method 529 replace method 62 reportlab module 573 importing 412 ReportLab package 412 creating graphics and documents in PDF format 411 drawing with 413–415 P Y X as alternative to 420 workings of 412 reportlab.graphics package 413 reportlab.graphics.charts.lineplots package LinePlot class 418 repr function 25, 561 requirement specification 342–343 return statements 194, 567 returning values from functions 549 reverse method lists 46, 47, 98 reversed function 47, 98, 561 Rich Site Summary. See RSS robotparser module 302 rollback method connection object 288 Rossum, Guido 19 round function 17, 561 rowcount attribute cursor objects 289 rpm --install command installing RPMs 423 RPM package manager installing Python on Linux 4, 5 RPMs installing with rpm --install command 423 RSS introduction 335–336 rule objects action method 401 condition method 401 methods 400

■INDEX<br />

595<br />

<strong>Python</strong> C API 365<br />

hand-coded palindrome module 369–370<br />

python command 3<br />

<strong>Python</strong> Cookbook<br />

Alex Martelli 93<br />

<strong>Python</strong> Database API 285<br />

connections and cursors 287–289<br />

exceptions 287<br />

global variables 286<br />

types 289<br />

construc<strong>to</strong>rs and special values 289<br />

<strong>Python</strong> functions 112–113<br />

<strong>Python</strong> Server Pages 331–332<br />

python-list@python.org mailing list 573<br />

PYTHONPATH environment variable<br />

including module direc<strong>to</strong>ry in 208<br />

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

P Y X package 412<br />

PyXML module 573<br />

■Q<br />

-Qnew command-line switch 11<br />

quote function<br />

urllib module 301<br />

quote_plus function<br />

urllib module 301<br />

■R<br />

Raggett, Dave<br />

Getting Started with HTML 391<br />

raise statement<br />

catching exceptions 163<br />

examples of using with Exception class<br />

160–161<br />

raise statements 568<br />

random module 501<br />

examples 229–231<br />

introduction 228<br />

random function<br />

random module 228<br />

randomString function 510<br />

randrange function<br />

random module 228<br />

range function 561<br />

checking for arguments 213<br />

for loops 548<br />

raw strings 27–28<br />

raw_input 23<br />

compared <strong>to</strong> input 26<br />

raw_input function 241, 548, 561<br />

rawDataReceived event handler 310<br />

Raymond, Eric S.<br />

Art of UNIX Programming, The 387<br />

RDF Site Summary. See RSS<br />

re module<br />

content of 238–241<br />

examples 244–251<br />

importing 160<br />

MatchObjects and groups 241<br />

support for regular expressions 235<br />

using group numbers and functions in<br />

substitutions 242–243<br />

read method<br />

file object 258<br />

readline method<br />

file object 260–261<br />

using in a while loop 264<br />

Really Simple Syndication. See RSS<br />

recursion 129<br />

binary search 131–133<br />

fac<strong>to</strong>rial and power 130–131<br />

parts 129–130<br />

recursive genera<strong>to</strong>rs 192–193<br />

making safer 193–194<br />

reduce function 135, 136, 137, 561<br />

Refac<strong>to</strong>ring<br />

Kent Beck et al 387<br />

refac<strong>to</strong>ring, description 439<br />

reference counting 366–367

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

Saved successfully!

Ooh no, something went wrong!