Beginning Python - From Novice to Professional

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

16.01.2014 Views

■INDEX 587 initialization 38 naming functions 370 inplace parameter fileinput module 220 input compared to raw_input 26 input function 548, 560 fileinput module 219 insert method lists 45 inspect module 156, 408 install command 375 instant markup project 391 first implementation 394 adding markup 395–396 goals for project 392 preparation 392–393 problem defined 391 second implementation 396 components 396 constructing rules and filters 402–403 filters 401 handler superclass 398–399 handlers 397 Parser class 401 putting it all together 403–408 Rule superclass 400 rules 399–400 tools 392 int function 548, 560 integers 10 large integers 12–13 IntegrityError exception class 287 InterfaceError exception class 287 interfaces and introspection 155–156 polymorphism 155–156 InternalError exception class 287 interpreter, interactive 8–9 Introduction to Algorithms Cormen, Thomas H. et al 387 IOError class 161 IronPython 571 alternative Python distribution 7 extending 358–360 is not operator 558 is operator 90, 91, 558 isfirstline function fileinput module 219, 220 isinstance function 560 isstdin function fileinput module 219 issubclass function 560 issubclass method built-in method 153 item access 179 basic sequence and mapping protocol 180–182 subclassing list, dict and str 182–184 items method dictionaries 75 iter function 560 iteration utilities numbered iteration 97 parallel iteration 96–97 iterators __iter__ method 173 iterator protocol 190 making sequences from iterators 191 iteritems method dictionaries 75, 96 iterkeys method dictionaries 76, 96 itertools module 252 itervalues method dictionaries 77, 96

588 ■INDEX ■J Java Swing GUI toolkit 271, 573 example of using with Jython 282–283 join method 61–62 as inverse of split method 63 JUnit test framework unittest module 347 Jython 571 alternative Python distribution 7 example of using with Java Swing GUI toolkit 282–283 extending 358–360 ■K KeyError class 161 keys method dictionaries 76 keyword arguments using with wx constructors 274 keyword parameters 119–121 Knuth, Donald Art of Computer Programming, The 387 ■L lambda expressions 133 lambda operator 558 ALTEX introduction 392 len function 40, 551, 560 library_dirs variable setting 291 line method Canvas class 413 lineno() function fileinput module 219 LinePlot class reportlab.graphics.charts.lineplots package 418 LineReceiver class Twisted framework 455 LineReceiver protocol twisted.protocols.basic module 310 lines generator instant markup project 394 linesep variable os module 217 Linux installing Python 3–4 installing Python with RPM 4–5 list comprehension 101–102 list function 41, 560 listen method dispatcher class 458 socket class 298 listenTCP function twisted.internet.reactor module 309 lists 31, 40, 548 assigning to slices 42 changing 41 changing lists 41 deleting elements 42 list function 41 methods 43, 562 advanced sorting 48–49 append method 43 count method 43 extend method 44 index method 44 insert method 45 pop method 45–46 remove method 46 reverse method 46–47 sort method 47–48 load function pygame.image module 530 locals function 560 localtime function time module 441

588 ■INDEX<br />

■J<br />

Java Swing GUI <strong>to</strong>olkit 271, 573<br />

example of using with Jython 282–283<br />

join method 61–62<br />

as inverse of split method 63<br />

JUnit test framework<br />

unittest module 347<br />

Jython 571<br />

alternative <strong>Python</strong> distribution 7<br />

example of using with Java Swing GUI<br />

<strong>to</strong>olkit 282–283<br />

extending 358–360<br />

■K<br />

KeyError class 161<br />

keys method<br />

dictionaries 76<br />

keyword arguments<br />

using with wx construc<strong>to</strong>rs 274<br />

keyword parameters 119–121<br />

Knuth, Donald<br />

Art of Computer Programming, The 387<br />

■L<br />

lambda expressions 133<br />

lambda opera<strong>to</strong>r 558<br />

ALTEX<br />

introduction 392<br />

len function 40, 551, 560<br />

library_dirs variable<br />

setting 291<br />

line method<br />

Canvas class 413<br />

lineno() function<br />

fileinput module 219<br />

LinePlot class<br />

reportlab.graphics.charts.lineplots<br />

package 418<br />

LineReceiver class<br />

Twisted framework 455<br />

LineReceiver pro<strong>to</strong>col<br />

twisted.pro<strong>to</strong>cols.basic module 310<br />

lines genera<strong>to</strong>r<br />

instant markup project 394<br />

linesep variable<br />

os module 217<br />

Linux<br />

installing <strong>Python</strong> 3–4<br />

installing <strong>Python</strong> with RPM 4–5<br />

list comprehension 101–102<br />

list function 41, 560<br />

listen method<br />

dispatcher class 458<br />

socket class 298<br />

listenTCP function<br />

twisted.internet.reac<strong>to</strong>r module 309<br />

lists 31, 40, 548<br />

assigning <strong>to</strong> slices 42<br />

changing 41<br />

changing lists 41<br />

deleting elements 42<br />

list function 41<br />

methods 43, 562<br />

advanced sorting 48–49<br />

append method 43<br />

count method 43<br />

extend method 44<br />

index method 44<br />

insert method 45<br />

pop method 45–46<br />

remove method 46<br />

reverse method 46–47<br />

sort method 47–48<br />

load function<br />

pygame.image module 530<br />

locals function 560<br />

localtime function<br />

time module 441

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

Saved successfully!

Ooh no, something went wrong!