Beginning Python - From Novice to Professional

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

16.01.2014 Views

■INDEX 593 playful programming 381 flexibility 381–382 configuration 383–385 prototyping 382–383 introduction 381 learning more 387 logging 385–387 minimum requirements 387 project structure 388 plus sign concatenating sequences 551 poll function asynchronous I/O 306–308 PolyLines, creating 415 polymorphism 140–142 forms of 142–143 interfaces 155–156 pop method dictionaries 76 lists 45, 46 popen functions running the Tidy program 317 popitem method dictionaries 76 sequence unpacking 84 poplib module 302 positional parameters 119 PostgreSQL database creating for bulletin board project 485 using for bulletin board project 484 pound bang #! 21 pow function 16, 561 Pragmatic Programmer, The Andrew Hunt and David Thomas 387 precision 54 conversion specifiers 57 print statements 14, 16, 567 using with commas 81–82 procedures 112 profile module 251, 353 profiling as alternative to unit testing 353–354 ProgrammingError exception class 287 programs importing as module 203 packaging 373–380 properties 184–185 __getattr__, __setattr__, and others 188–189 property function 185–186 static methods and class methods 187–188 working on old style classes 173 property function 173 creating properties 185–186 protocols description 179 prototyping 382–383 PSP (Python Server Pages) 331–332 Psyco tool speeding up programs 360 psycopg module 573 importing 484 Publisher 332–334 pump function pygame.event module 530 push method async_chat class 461 PuTTY software 457 Py_DECREF macro 366–367 Py_INCREF macro 366–368 py_modules directive 376 PyChecker tool 351 importing as module 351 using 352–353 Pygame using for arcade game 528 web site 527

594 ■INDEX pygame module 528, 573 error class 529 init function 529, 531 Surface function 528 pygame.display module 529 blit method 529 flip function 529, 531, 532 get_surface function 529 set_caption function 529 set_mode function 529, 531 update function 529, 532 pygame.event module get function 530, 532 pump function 530 pygame.font module Font function 529 pygame.image module load function 530 pygame.locals module 529 importing constants from 532 pygame.mouse module set_visible function 531 pygame.sprite module Group class 530 Sprite class 530 PyGTK GUI toolkit 271, 573 PyLint tool 351 importing as module 351 using 352, 353 PyQt GUI toolkit 271, 573 Pyrex tool speeding up programs 361 pysqlite downloading and installing 290–291 getting started 291 Python __future__ module 19 algorithms 9–10 alternative distributions 6–7 basics 547 cmath module 18 command prompt 20 comments 22 compiling from source 5–6 extending 357–570 functions 16, 549–550 getting input from user 15–16 hexadecimal numbers 13 installing on Debian Linux 5 installing on Gentoo Linux 5 installing on Linux 3–4 installing on Linux with RPM 4–5 installing on Macs 6 installing on Windows 1–2 interpreter 8–9 keeping up to date 8 large integers 12–13 loose ends 554 making scripts behave like normal programs 21–22 modules 17–18 numbers and expressions 10–12 objects 550–554 octal numbers 13 reference 557 expressions 557–566 statements 566–570 saving and executing programs 19–20 statements 14–15 strings 23 concatenating strings 24 input compared to raw input 26 long strings 27 raw strings 27–28 single-quoted strings and escaping quotes 23–24 string representations 25 Unicode strings 29 variables 13

594 ■INDEX<br />

pygame module 528, 573<br />

error class 529<br />

init function 529, 531<br />

Surface function 528<br />

pygame.display module 529<br />

blit method 529<br />

flip function 529, 531, 532<br />

get_surface function 529<br />

set_caption function 529<br />

set_mode function 529, 531<br />

update function 529, 532<br />

pygame.event module<br />

get function 530, 532<br />

pump function 530<br />

pygame.font module<br />

Font function 529<br />

pygame.image module<br />

load function 530<br />

pygame.locals module 529<br />

importing constants from 532<br />

pygame.mouse module<br />

set_visible function 531<br />

pygame.sprite module<br />

Group class 530<br />

Sprite class 530<br />

PyGTK GUI <strong>to</strong>olkit 271, 573<br />

PyLint <strong>to</strong>ol 351<br />

importing as module 351<br />

using 352, 353<br />

PyQt GUI <strong>to</strong>olkit 271, 573<br />

Pyrex <strong>to</strong>ol<br />

speeding up programs 361<br />

pysqlite<br />

downloading and installing 290–291<br />

getting started 291<br />

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

__future__ module 19<br />

algorithms 9–10<br />

alternative distributions 6–7<br />

basics 547<br />

cmath module 18<br />

command prompt 20<br />

comments 22<br />

compiling from source 5–6<br />

extending 357–570<br />

functions 16, 549–550<br />

getting input from user 15–16<br />

hexadecimal numbers 13<br />

installing on Debian Linux 5<br />

installing on Gen<strong>to</strong>o Linux 5<br />

installing on Linux 3–4<br />

installing on Linux with RPM 4–5<br />

installing on Macs 6<br />

installing on Windows 1–2<br />

interpreter 8–9<br />

keeping up <strong>to</strong> date 8<br />

large integers 12–13<br />

loose ends 554<br />

making scripts behave like normal<br />

programs 21–22<br />

modules 17–18<br />

numbers and expressions 10–12<br />

objects 550–554<br />

octal numbers 13<br />

reference 557<br />

expressions 557–566<br />

statements 566–570<br />

saving and executing programs 19–20<br />

statements 14–15<br />

strings 23<br />

concatenating strings 24<br />

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

long strings 27<br />

raw strings 27–28<br />

single-quoted strings and escaping<br />

quotes 23–24<br />

string representations 25<br />

Unicode strings 29<br />

variables 13

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

Saved successfully!

Ooh no, something went wrong!