extended to include languages such as Java, Eiffel and Guile. SWIG is most commonly used
to create high-level interpreted programming environments and systems integration, and as a
tool for building user interfaces. SWIG may be freely used, distributed and modified for com-
mercial or noncommercial use.
http://www.swig.org/
NumPy
NumPy is a nickname for a package of Numerical Extensions to Python. These extensions
add two powerful new types to Python: a new sequence type which implements multidimen-
sional arrays efficiently (multiarray) and a new type of function called a universal function
(ufunc) which works efficiently on the new arrays and other sequence types. These new
objects give Python the number-crunching power of numeric languages like MATLAB and
IDL while maintaining all of the advantages which Python has as a general-purpose program-
ming language. It’s also free, just like the rest of Python.
ftp://ftp-icf.llnl.gov/pub/python/README.html
Python News Group
comp.lang.python
comp.lang.python.announce
Python Imaging Library (PIL)
The Python Imaging Library adds an image object to your Python interpreter. You can load
image objects from a variety of file formats and apply a rich set of image operations to them.
http://www.pythonware.com/downloads.htm
PythonWorks
PythonWorks is a rapid-development environment under development by PythonWare/
Secret Labs AB.
http://www.pythonware.com/products/works/index.htm
Python books
1 Ascher, David and Mark Lutz. Learning Python. O’Reilly & Associates, 1999. ISBN:
1-56592-464-9.
2 Beazley, David. Python Essential Reference. New Riders, 1999. ISBN: 0-7357-090-17.
3 Harms, Daryl and Kenneth McDonald. The Quick Python Book. Manning Publications,
2000. ISBN: 1-884777-74-0.
4 Lundh, Fredrik. (the eff-bot guide to) The Standard Python Library. Electronic edition at
www.fatbrain.com.
5 Lutz, Mark. Programming Python. O’Reilly & Associates, 1996. ISBN: 1-56592-197-6.
626 APPENDIX G REFERENCES
X Window books G
6 Nye, Adrian and Tim O’Reilly. X Toolkit Intrinsics Programming Manual for X11,
Release 5 (Definitive Guides to the X Window System, Vol 4). O’Reilly & Associates, 1992.
ISBN: 1-56592-013-9.
7 Young, Douglas. The X Window System: Programming and Applications with Xt, OSF/
Motif, 2nd edition. Prentice-Hall, 1994. ISBN: 0-13123-803-5.
Tcl/Tk books
8 Flynt, Clifton. Tcl/Tk for Real Programmers. Academic Press (AP Professional), 1998.
ISBN: 0-12261-205-1.
9 Foster-Johnson, Eric. Graphical Applications with Tcl and Tk, 2nd edition. M&T Books,
1997. ISBN: 1-55851-569-0.
10 Harrison, Mark and Michael J. McLennan. Effective Tcl/Tk Programming: Writing Better
Programs in Tcl and Tk. Addison Wesley Longman, 1997. ISBN: 0-20163-474-0.
11 Ousterhout, John. Tcl and the Tk Toolkit. Addison-Wesley, 1994. ISBN: 0-20163-337-
X.
12 Raines, Paul. Tcl/Tk Pocket Reference. O’Reilly & Associates, 1998. ISBN: 1-56592-498-3.
Human factors engineering
13 Coe, Marlana. Human Factors for Technical Communicators. John Wiley & Sons, 1996.
ISBN: 0-47103-530-0.
14 Cooper, Alan. About Face: The Essentials of User Interface Design. IDG Books, 1995.
ISBN 1-56884-322-4.
15 Olsen, Dan R., Jr., Dan E. Olsen and Dan R. Olsen. Developing User Interfaces. Morgan
Kaufmann, 1998. ISBN 1-55860-418-9.
HUMAN FACTORS ENGINEERING 627
index
A add_cascade 41, 503 alignment 301
add_checkbutton 41, 503 alphabeticvalidator 563
aboutcontact 147, 544 add_command 40, 503 alphanumericvalidator 563
aboutcopyright 147, 544 add_radiobutton 41, 503 anchor 84, 87, 92, 124, 168,
AboutDialog 50, 147, 150, add_separator 503
addcascademenu 572 205, 428, 516
159, 542 adding scroll bars animation 134, 214
aboutcontact 544
aboutcopyright 544 dynamically 151 button press 247
aboutversion 147, 544 additional Menu options 399 making a widget flash 123
buttonbox 544 addmenu 147, 148, 159, 573 anonymous function 103
components 544 addmenuitem 147, 160, 263, Any-Enter 99, 252
dialogchildsite 544 event 96
hull 544 573 Any-Leave 116, 252
message 544 addoptions 567 API 314, 316
options 543 addPage 173, 174, 583 append 109, 176, 193
separator 544 addtag 267 appending lists 5
absolute measurements 257 addtag_above 458 application framework 14
abstract class 11 addtag_all 458 application level events 104,
accessing dictionaries 8 addtag_below 458 107
activate 92, 96, 304, 499, 527, addtag_closest 458 application profiling 357
570, 618 addtag_enclosed 459 Application Program Interface
activatecommand 543, 545, addtag_overlapping 459 (See API)
551, 556, 558, 576, 588, addtag_withtag 256, 257, application structure 21, 27
603, 605 application-level binding 106
activebackground 40, 428, 439 459 applicationname 543
activeborderwidth 502 after 107, 110, 124, 219, 224, AppShell 50, 156, 169, 172,
activecolor 582 175, 245
activeforeground 428, 439 369, 433, 511 arc options 388
activerelief 526 after_cancel 434 architecture 14, 375
add 240, 548, 579, 581, 587, after_idle 369, 434 argument 10
591 alarms 369 keyword 10
alignbuttons 548
alignlabels 113
629
argument (continued) unbind 546 bindtags 434
named 10 Balloon help 148, 160, 245, BinHex 616
positional 10 bitmap 208, 428, 453, 470
343
arrow 261, 473 bargraphs 286 bitmap 453
arrowbutton 550 base class 11 cget 453
arrowshape 261, 473 Base text indices 401 class 452–453
askfloat 141 batch file 378 configure 453
askinteger 141, 142, 144 baud 230 data 452
askokcancel 143 bbox 242, 268, 459, 499, file 452
askquestion 143 height 453
askretrycancel 141, 143 532, 593, 600, 602 image type 416
askstring 141 bd 426 maskdata 452
askyesno 141, 143 before 511 maskfile 452
aspect 446, 510 behavior of complex options 389, 416
assert 350 shared options 452
assigning a unique identity to systems 96 type 453
bell 434 width 453
canvas items 267 bg 426 BitmapImage 245
asynchronous bigincrement 523 blank 514
binary distribution 611 blank cards 212
techniques 361–373 bind 20, 96, 100, 101, 102, blocking I/O 364
atomic operation 365 blocking read 231
attribute variables 351 104, 105, 115, 193, 434, BMP 215
audio feedback 105 546 BooleanVar 108, 152
author online xxiii application level 104 borderframe 592, 593, 595,
autoclear 549 597, 601
automatic scroll bars 151 binding 106 bordermode 516
autorepeat 553, 607 binding events and borderwidth 426, 578
borderx 543, 551, 556, 576,
B callbacks 104 588, 603, 605
binding events to bordery 543, 551, 556, 576,
B1 617 588, 603, 605
B2 617 callbacks 95 borrowed reference 326
B2-Motion 99 binding widgets to dynam- bounding box (See bbox)
B3 617 break 107
background 426, 439 ic data 108 breakpoints 336
callbacks 95 browsers 175–183
color 341 changing bindings 107 tree 175
setting color 154 class level 104, 105 building a dispatcher 235
Balloon 50, 147, 245, instance level 104 building a ruler 254
545–546 shell level 104 building extensions in
bind 546 toplevel window level 105 C++ 320
clearstatus() 546 Bind and event methods 420 building extensions to
hull 545 bind method 103, 104 Python 311
label 546 bind_all 105, 252, 434 building for MacOS 616
methods 546 bind_class 105, 106, 434 building for UNIX 610
showstatus 546 binding 95–119
tagbind 546 binding and virtual
tagunbind 546 events 420
binding Balloon help to a
widget 162
binding widgets to dynamic
data 108
630 INDEX
building for Windows 614 frame 547 confine 457
building front panels 199 hull 547 coords 459
building navigation into an index 548 crate_bitmap 460
insert 548 create_arc 460
application 302 invoke 548 create_image 460
building Python 610, 612, label 547 create_line 460
methods 548 create_oval 460
615 numbuttons 548 create_polygon 460
extensions 316 setdefault 548 create_rectangle 460
building Tk 612, 615 buttonboxpos 543, 551, create_text 460
built-in validation 114 556, 558, 576, 588, 603, create_window 460
bus error 325 605 dchars 460
busy cursor 155 ButtonPress 97, 618 delete 460
Button 16, 20, 36, 453, 618 ButtonPress-1 99, 178, 245 dtag 460
disabling 36, 89 ButtonPress-2 99 find_above 461
flash 455 ButtonRelease 97, 618 find_all 461
iconic 247 ButtonRelease-1 20, 245 find_below 461
invoke 455 ButtonRelease-3 99 find_closest 461
methods 406 buttons 543, 551, 556, 558, find_enclosed 461
methodsmapping 406 576, 588, 603, 605 find_overlapping 461
relief 36 buttontype 590 find_withtag 461
shared options 454 bytecode 349 focus 461
tkButtonDown 455 bytecode engine 4 gettags 462
tkButtonEnter 455 icursor 462
tkButtonInvoke 455 C index 462
tkButtonLeave 455 insert 462
tkButtonUp 455 C compiler 314 insertbackground 457
widget 405 C structure 9 insertborderwidth 457
widget standard cache 198 insertofftime 457
callback 95–119 insertontime 457
options 405 insertwidth 457
widget-specific binding events 95 itemcget 462
calling Python from C/ itemconfigure 462
options 405 move 463
Button-1 99, 193, 196, 209 C++ 320 PostScript 463
Button1 617 Canvas 44, 122, 192, 202,
Button1-ButtonRelease 193 colormap 463
Button1-Motion 193 456 colormode 463
Button-2 99 addtag_above 458 file 463
Button2 617 addtag_all 458 fontmap 464
Button3 617 addtag_below 458 height 464
buttonaspect 549, 553, 607 addtag_closest 458 pageanchor 464
ButtonBox 51, 161, 544, addtag_enclosed 459 pageheight 464
addtag_overlapping 459 pagewidth 464
552, 557, 559, 577, 588, addtag_withtag 459 pagex 464
604, 606 bbox 459 pagey 464
add 548 canvasx 459
alignbuttons 548 canvasy 459
components 547 closeenough 457
delete 548
INDEX 631
Canvas, PostScript scan_dragto 252 coords 474
(continued) scan_mark 252 create_line 474
rotate 464 scrollregion 252 delete 474
width 464 selecting items 242 itemconfigure 474
x 464 stretching canvas joinstyle 473
y 465 shared options 472
scale 465 objects 258 smooth 473
scan_dragto 465 tags 250 splinesteps 473
scan_mark 465 xscrollcommand 252 stipple 474
scrollregion 457 yscrollcommand 252 tags 474
select_adjust 465 Canvas Arc 468 Canvas methods 386
select_clear 465 coords 469 canvas origin 242
select_from 465 create_arc 469 Canvas oval 474
select_item 465 delete 469 coords 475
select_to 466 extent 468 create_oval 475
shared options 456 itemconfigure 469 delete 475
tag_bind 466 outline 468 itemconfigure 475
tag_lower 466 outlinestipple 468 outline 475
tag_raise 467 shared options 468 shared options 475
tag_unbind 467 start 468 stipple 475
type 467 stipple 469 tags 475
xscrollincrement 458 style 469 Canvas polygon 476
xview_moveto 467 tags 469 create_polygon 477
xview_scroll 467 Canvas bitmap 470 delete 477
yscrollcommand 458 bitmap 470 itemconfigure 477
yscrollincrement 458 coords 471 outline 476
yview_moveto 467 create_bitmap 470 shared options 476
yview_scroll 467 delete 470 smooth 476
itemconfigure 471 splinesteps 476
canvas 17, 593 shared options 470 stipple 476
adding scrollbars 251 tags 470 tags 476
coordinates 242 Canvas image 471 Canvas postscript
create line 238 coords 472 options 393
create oval 238 create_image 472 Canvas rectangle 477
create rectangle 238 delete 472 coords 478
deciding if the pointer is in image 471 create_rectangle 478
a region 198 itemconfigure 472 delete 478
determining the size of an shared options 471 itemconfigure 478
image 194 tags 471 outline 478
generating PostScript 250 canvas item shared options 477
grab handles 258 bounding box 238 stipple 478
locating the nearest Canvas item types 388 tags 478
object 242 Canvas line 472 Canvas text 478
moving objects 243 arrow 261, 473 coords 480
origin 242 arrowshape 261, 473 create_text 479
panning 253 capstyle 473
relative positioning 201
632 INDEX
delete 480 toggle 484 class level 105
font 479 variable 483 class libraries 9, 10, 129, 131,
itemconfigure 480 Checkbutton methods 407
justify 479 Checkbutton widget 406 202
shared options 479 Checkbutton widget standard class variable 138, 158, 186
stipple 479 options 406 class-level binding 106
tags 479 Checkbutton widget-specific clear 564, 602
text 479 options 407 clearstatus() 546
Canvas widget 385–393 checkentry 563 client 446
Canvas widget standard child widgets 78
options 385 choosing fonts 343 registration 97
Canvas widget-specific class 9–11, 120, 492, 540 client/server techniques 371
options 386 __init__ 10 clipboard_append 434
Canvas window 480 abstract 11 clipboard_clear 435
coords 481 base 11 clipper 597
create_window 481 class library 129 closeenough 457
delete 481 composite widgets 139 collecting passwords 145
itemconfigure 481 creating an instance 10 color 48, 129
shared options 480 defining a class 9
tags 480 generalized 11 in GUIs 344
window 480 header 11 setting colors 47
canvascolor 582 inheritance 10, 11 supporting color blind
canvasheight 582 inherited methods 139
canvasmargin 592 instance 9 users 345
canvaswidth 582 MegaWidget 136 transforming 130
canvasx 193, 240, 459 methods 10 variations 130
canvasy 193, 240459 mixin 126 color bitmap 309
capstyle 473 mixin classes 11 color blind users 345
CDE 306 multiple inheritance 11, color in graphical user
C-extension 13 interfaces 344
cget 434, 453, 490, 508, 510, 139 color transformation 129,
514, 567 name mangling 11 131
change-password dialog 86 object description 9 color variations 130
changing bindings 107 private methods 11 colormap 98, 463, 492, 540
Checkbutton 38, 481 private variables 11 colormap events 98
deselect 484 public methods 11 colormap flashing 98
flash 484 public variables 11 colormap notification 98
indicatoron 483 self 10 ColormapNotify 98
invoke 484 subclassing 129 colormapwindows 446
offvalue 483 switch 133 colormode 463
onvalue 483 switches 138 column 87, 116, 117, 493,
select 484 this 10 79, 301
selectcolor 483 toggle switch 136 columnconfigure 252
selectimage 483 variable 138 columnspan 89, 189, 493
shared options 482 class constructors 14 ComboBox 16, 52, 88, 153,
class header 11 340, 549, 552
arrowbutton 550
components 550
entryfield 550
INDEX 633
ComboBox (continued) configure 93, 99, 158, 159, CounterDialog 55, 556
get 153, 550 303, 435, 453, 490, 508, buttonbox 557
hull 550 510, 514, 567 components 557
invoke 551 counter 557
label 550 ConfigureNotify 98 deleteentry 557
methods 550 configurepane 587 dialogchildsite 557
options 549 confine 457 hull 557
popup 550 connector indexentry 558
scrolledlist 550 insertentry 558
selectitem 153, 551 10Base-T 200 methods 557
setlist 153 BNC 200, 201 options 556
size 551 FDDI 200, 201 separator 557
J-25 201
ComboBoxDialog 53, 551 J-45 201 create 331
buttonbox 552 J-50 201 create arc 388
combobox 552 constraint 254 create bitmap 389
components 552 Constraint Widget class 77 create image 389
dialogchildsite 552 container 78, 77, 81, 92, 492, create line 390
hull 552 540 create oval 390
methods 553 containerCanvas 583 create polygon 391
options 551 Control 617 create rectangle 391
separator 552 Control-Insert 99 create text 392
Control-Shift-F3 99 create window 392
command 429, 447, 543, converting screen coordinates create_arc 460, 469
552, 556, 558, 560, 576, to canvas coordinates 241 create_bitmap 460, 470
584, 586, 588, 590, 603, converting Tcl/Tk scripts to create_image 177, 217, 224,
605 Tkinter 237
coordinates 238 460, 472
common methods coords 459, 469, 471, 472, create_line 225, 331, 460,
bind_all 434 474, 475, 477, 478, 480,
configure 435 481, 524 474
focus_get 436 copy 490, 514 create_oval 122, 132, 204,
grab_set 436 Corporation for National
image_types 437 Research Initiatives 209, 460, 475
tk_focusPrev 439 (CNRI) 4 create_polygon 122, 132,
Counter 54, 553
compare 532 components 555 255, 460, 477
compiled C++ 348 decrement 556 create_rectangle 122, 193,
compiler 314 downarrow 555
complex 272 entryfield 555 204, 209, 460, 478
component 113, 567 frame 555 create_text 224, 331, 460, 479
componentaliases 567 hull 555 create_window 45, 460, 481
componentgroup 567 increment 556 createcommand 578
composite widgets 136, 139 label 555 createcomponent 76, 159,
composites 120 methods 556
concatenating lists 6 options 553 239, 568
config.h 318 uparrow 556 createfilehandler 370
configuration 78, 97 createlabel 568
configuration events 98 creating a data dictionary
165
creating a drawing
program 238
634 INDEX
creating a progress datagram 372 deletemenuitems 263, 573
widget 161 datatype 553 deleting a member 7
date validator 113 delPage 583
creating a scrolled canvas 251 dates 117 delta 527
creating a separator 185 datevalidator 563 deselect 484, 521
creating a tool bar 264 dblclickcommand 598 deselectall 176
creating a tree widget 181 dchars 460 designing effective
creating arrows 261 DDD 337
creating image maps 191 Deactivate 618 graphics 338–347
creating new megawidgets 73 deactivatecommand 543, destroy 99, 435
crossing events 97 destroycomponent 568
CURRENT 234, 253 545, 552, 557, 558, 576, destroying a window 94
curselection 499 588, 603, 605 device events 97
cursor 426 deactiveColor 582 Dialog 56, 558
cursors 621–624 debug 532
DDD 337 buttonbox 559
arrow 621 how to to debug an components 559
bottom_left_corner 621 dialogchildsite 559
bottom_right_corner 621 application 333 hull 559
bottom_side 621 IDLE 336 interior 559
crosshair 622 pdb 336 invoke 559
draft_large 622 debug information 339 methods 559
draft_small 622 debug window 334 options 558
fleur 622 debugger 27, 329, 333, 336, separator 559
left_ptr 622 361 dialog 140–198
left_side 622 debugging applications 329– askokcancel 143
ll_angle 622 337 askquestion 143
lr_angle 622 debugging network askretrycancel 143
plus 623 applications 330 askyesno 143
right_side 623 debugging techniques 311 browser 175
top_left_arrow 623 deconstructor 325 data entry 142
top_left_corner 623 decoration error messages 141
top_right_corner 624 window 307 getting a filename from the
top_side 624 decrement 556, 608
ul_angle 624 default action 142 user 271
ur_angle 624 default binding 304 hierarchical browsers 175
watch 624 default value 154 human factors 144
xterm 624 defaultbutton 543, 552, 557, image map 191
curved lines 238 558, 576, 588, 603, 606 modal 141
defineoptions 75, 156, 568 password 145
D defining classes 9 popup 144
defining validation showerror 143
data 452, 513 requirements 165 showinfo 143
data dictionaries 165–171 deiconify 308, 309, 447 showwarning 143
data entry 140 deleteall 591 single-shot forms 146
data entry dialogs 142 deleteentry 557, 589 warning messages 141
data verification 95, 111 deletemenu 573 wizard 184
Dialog module 141
INDEX 635
dialogchildsite 544, 552, 557, downminutearrow 608 Entry 20, 37, 87, 484
559, 577, 589, 604, 606 downsecondarrow 608 delete 487
draw exportselection 486
dictionary 5, 23 get 487
accessing 8 charts 276 icursor 487
data 8 curved lines 238 index 487
initializing 8 filled oval 244 indices 394
iterating through entries 8 filled rectangle 244 insert 487
keys 8 freehand curves 244 insertbackground 486
modifying 8 graphs 276 insertborderwidth 486
sorting 8 lines 237–275 insertofftime 486
objects 237–275 insertontime 486
dictionary reference 15 open oval 244 insertwidth 486
digital multimeter 220 open rectangle 244 scan_dragto 487
digits 523 ovals 238 scan_mark 487
direction 508 rectangles 238 selection_adjust 488
disableall 573 rubber lines 244 selection_clear 488
disabledforeground 429, 439 smoothed curves 244 selection_from 488
disabling a button 89 straight lines 244 selection_present 488
dispatcher 23 drawing on a canvas 238 selection_range 488
drawing program 238 selection_to 488
simple example 235 drawing tools 237 shared options 485
display 310 drawn objects 238 show 487
display stack 243 dropdown 549 types 398
distributing applications 374 dtag 265, 460 widget 393–395
distributing Python 311 dtwm 306 widget methods 395
distributing Tkinter dynamic callback widget standard
handlers 95, 107 options 393
applications 374–379 dynamic linking 316 widget-specific
distribution dynamic load libraries 374 options 394
dynamically-loadable xview 488
alternative schemes 375 modules 317 xview_moveto 488
architectures 375 xview_scroll 488
batch file 378 E
Distutils special interest entry 16, 563, 575, 594
effect of debug on behavior of a widget 166
group 379 performance 330 password entry 145
freeze 379
general issues 374 elementborderwidth 526 entry fields 86
installation 374 elements of good interface entrycget 504
InstallShield 376 entryconfigure 504
squeeze 379 design 339 EntryField 56, 111, 112, 142,
tools 379 emacs 333
UNIX applications 375 embedding Python 313, 325 559
distribution tools 379 enableall 573 checkentry 563
dlineinfo 533 encoding 48 clear 564
dll 376 Enter 99, 245, 618 components 563
Double-Button-1 99, 178 EnterNotify 97 entry 563
DoubleVar 109, 152
downarrow 555
downhourarrow 608
636 INDEX
hull 563 filter 96 event mechanism 99
invoke 564 flushing the event event object 102, 106
label 563
methods 563 queue 125 event.focus 100
options 560 focus 98 event.height 100
setentry 564 FocusIn 98 event.keysym 100
valid 564 FocusOut 98 event.keysym_num 100
validation function return grab 97 event.num 100
Gravity 98 event.send_event 100
values 560 handler 96 event.serial 100
validators 561 handling multiple event.time 100
entryfield 550, 555, 589 event.type 100
environment 376 bindings 106 event.widget 100, 106
environment variables 613 handling multiple event.width 100
errorbackground 560 event.x 100
eval 21, 25, 26, 128 callbacks 106 event.x_root 100
event 95–119 indirect 102 event.y 100
And-Enter 96 keyboard 97 event.y_root 100
behavior of complex KeyPress 97 focus 101
KeyRelease 97 send_event 101
systems 96 keysyms 98, 619 event propagation 97, 106
bind 96 LeaveNotify 97 event queue 96
bind methods 104 Map 98 event storm 107
binding callbacks 102 modifier keys 97 event type 97, 101, 618
binding events to modifiers 98, 617 Activate 618
motion 97 Button 618
callbacks 95 motion events 102 ButtonPress 618
binding widgets to dynam- MotionNotify 97 ButtonRelease 618
mouse 97 Deactivate 618
ic data 108 performance issues 102 Enter 618
boundary 97 pointer 97 FocusIn 618
ButtonPress 97 pointer motion 97 FocusOut 618
ButtonRelease 97 propagation 97 Key 618
callbacks 95, 102 qualifier 98, 619 KeyPress 618
colormap 98 Reparent 98 Leave 618
configuration 78, 97, 98 takefocus 98 Map 618
ConfigureNotify 98 type 98 Motion 618
crossing 96, 97 types 618 Unmap 618
device events 97 Unmap 98 event.focus 100
direct 102 unrecognized events 101 event.height 100
dynamic callback Visibility 98 event.keysym 100, 106
event driven systems 95 event.keysym_num 100
handlers 95, 107 event handler 96, 101, 102, event.num 100
enter widget 96 107 event.send_event 100
EnterNotify 97 break 107 event.serial 100
event loop 96 event key symbols 619 event.time 100
event mask 97, 99 event loop 96, 365
event queue 96 event mask 97, 99, 101
event storm 107
exposure 97, 98
INDEX 637
event.type 100 flash 455, 484, 521 sans serif 340, 343
event.widget 100, 106, 118 FLAT 33 serif 343
event.width 100 fliparrow 549 setting a font 47
event.x 100, 193 float 293 slant 48
event.x_root 100 floating-point operations 359 weight 48
event.y 100, 193 flushing the event queue 125 fonts and colors 47
event.y_root 100 focus 101, 114, 303, 305, 461 foreground 426, 439
event_add 435 focus events 98 forget 185, 187
event_delete 435 focus window 98 format 513, 515
event_generate 435 focus_displayof 435 format strings 321
event_info 435 focus_force 436 forms 140–198
event-mechanism 95 focus_get 436 designing effective
events and keysyms 617–620 focus_lastfor 436
exceptions 23, 26, 356 focus_set 100, 106, 159, 193, forms 140
fractals 271
mechanism 23 303, 436 fraction 527
NotImplementedError 127 FocusIn 98, 99, 209, 618 Frame 20, 21, 33, 491
exec 21, 25, 26, 168, 173, 215 focusmodel 447
expand 82, 84, 87, 124, 511 FocusOut 98, 99, 116, 209, class 492
exportfile 602 colormap 492
exportselection 486, 498, 529 618 container 492
exposure events 98 font class 489 master 33
extending Python 313–328 shared options 491
extension libraries 375 actual 490 widget 407
extension module 229 cget 490 widget standard
extent 290, 468 configure 490
extravalidators 560 copy 490 options 407
families 491 widget-specific
F family 489
font 489 options 408
fg 426 measure 490 visual 492
file 452, 463, 513 metrics 491 frame 20, 447, 547, 555, 590,
names 491 597, 608
reading 190 overstrike 489 freehand curves 244
File menu 148 size 489 freeze 379
fill 80, 82, 83, 84, 124, 249, slant 490 from 523
underline 490 from_coords 515
281, 511 weight 490 front panel 199
transparent 235 font descriptors 47 making
fill color 244 font family 47, 489
filter 96, 356, 357 font methods 423 measurements 202
find_above 461 font options 422 FTP 297
find_all 461 fontmap 464 function 10
find_below 461 fonts 16, 203, 422, 426, 479,
find_closest 240, 461 489 G
find_enclosed 461 encoding 48
find_overlapping 461 family 47 gamma 513
find_withtag 234, 253, 256, pointSize 48 garbage collection 218
461 generalized class 11
generating random
numbers 109
638 INDEX
geometry 81, 93, 150, 156, strip charts 296 grid_columnconfigure 494
307, 308, 447 3-dimensional 292 grid_configure 494
threshholds 298 grid_forget 494
geometry management 78, Gravity 98 grid_info 495
420 Grid 77, 78, 86, 308, 492 grid_location 495
column 86, 493 grid_propagate 495
geometry manager 33, 77, 307 columnspan 89, 493 grid_remove 495
Grid 86, 492 grid 494 grid_rowconfigure 495
grid 116 grid_bbox 494 grid_size 495
Pack 511 grid_columnconfigure grid_slaves 495
Packer 79 GROOVE 33
Place 516 494 groove 342
Placer 90 grid_configure 494 Group 57, 564
grid_forget 494
geometry methods 307 grid_info 495 components 564
get 118, 152, 487, 499, 514, grid_location 495 groupchildsite 564
grid_propagate 495 hull 565
524, 527, 533, 550, 585, grid_remove 495 interior 565
600, 602 grid_rowconfigure 495 methods 565
getattr 217 grid_size 495 options 564
getboolean 436 grid_slaves 495 ring 565
getcurselection 579, 591, 600 in_ 493 tag 565
getint 609 ipadx 493 group 448
getPage 583 ipady 493 groupchildsite 564
getstring 609 methods 422 GUI
gettags 234, 253, 462 minsize 493 color scheme 338
getting optimum options 421 designing effective
performance 311 pad 493
getvar 436 padx 493 interfaces 338
ghosting 257 pady 493 ergonomics 338
GIF 208, 215, 220 row 86, 493 font selection 338
global data 9 rowspan 89, 494 interface design 339
global data space 361 spanning rows and layout 77
grab 97 screen 77
grab handles 258, 262, 267 columns 87 GUI toolkit 12
grab_current 436 sticky 86, 494 GUIAppD xvii
grab_release 436 weight 494
grab_set 436 grid 116, 340, 494 H
grab_set_global 436 column 116
grab_status 437 columnconfigure 252 handling multiple
graph widget 279 command 421 bindings 106
graphic selection 194 columnspan 189
graphs 276 row 116 handshaking 231
bargraphs 286 rowconfigure 252 HAVE_CONFIG_H 318
cubic splines 281 sticky 116 height 429, 453, 464, 514,
drawing axes 277 sticky attribute 145
fit to scale 282 grid_bbox 494 517
pie charts 289 “Hello World” 18
smoothing lines 279 helpmessage 575
hex nut 131
INDEX 639
hexadecimalvalidator 563 icon methods 309 import 353
hierarchical packing 84 iconbitmap 309, 448 importfile 602
highlight color 214 iconbox 309 in_ 493, 511, 517
highlightbackground 426, iconic 308 increment 554, 556, 609
iconic button 247 indentation 331
439 iconify 308 index 178, 462, 487, 499,
highlightcolor 426, 439 iconify windows 308
highlightthickness 100, 170, iconmargin 543, 576 504, 533, 548, 579, 585,
iconmask 448 591
302, 303, 426 iconname 22, 309, 448 indexentry 558, 589
high-speed serial 200 iconpos 543, 576 indexing lists 6
histograms 276, 286 iconposition 309, 448 indicatoron 38, 483, 508,
history 549 iconwindow 309, 449 520
horizflex 596 icursor 462, 487 indicators 201
horizfraction 596 IDE 336 inheritance 11
horizontal scroll bar 151 identify 525, 527 inherited classes 10
horizscrollbar 593, 597, 599, IDLE 329, 336 inherited methods 15, 139,
if-elif-else 127, 129 433
601 Image 88, 91, 93, 176 __init__ 10, 11
hotkey 148 initialise 112, 148, 581
hourentryfield 608 class 416 initialiseoptions 76, 568
hscrollmode 592, 596, 598, options 389 initialitem 584
methods 416 initialization 352
601 image 90, 429, 471 initializing an instance 10
hull 26, 544, 545, 547, 550, bitmap 208 initializing colors 157
BMP 182, 208 initializing dictionaries 8
552, 555, 557, 559, 563, determining the size of an initializing fonts 157
565, 566, 570, 572, 575, initializing lists 5
577, 579, 581, 583, 585, image 194 initializing Tk 158
589, 590, 593, 595, 597, editor 86, 87 initializing tuples 7
599, 602, 604, 606, 608 GIF 182, 208 INITOPT 75, 156
hull_borderwidth 239 JPEG 182 initwait 545, 554, 607
hull_height 150 JPG 182 insert 118, 189, 462, 487,
hull_relief 239 maps 191–198, 305 499, 533, 548, 579, 587
hull_width 150 overlay 215, 220 insert_cascade 504
hulldestroyed 568 overlay techniques 233 insert_checkbutton 504
Human Factor PPM 182 insert_command 504
Engineering 342 ray-traced 232 insert_radiobutton 504
human factors 342 three-dimensional 232 insert_separator 504
using dialogs 144 image_cget 533 insertbackground 439, 457,
image_configure 533 486, 529
I image_create 44 insertborderwidth 457, 486,
image_names 437, 533 529
ibnd image_types 437 insertentry 558, 589
instance level 105 ImageDraw 272 insertofftime 457, 486, 529
ImageEnhance 88 insertontime 457, 486, 529
ICCCM 309 ImageTk 88, 91, 93, 176
icon 176, 307, 308, 544, 577
bitmap 309
color bitmap 309
name 309
position 309
640 INDEX
insertwidth 457, 486, 530 KeyRelease-backslash 99 centering a widget 91
installation tools 184 keys 269, 437 geometry management 78
InstallShield 376 keystroke 114 introduction 77
instance 9, 10, 351 keysyms 104, 106, 619 negotiation 78
instance level event 105 keyword 23 positioning a window out-
instance variable 10 keyword arguments 15
int 273 keyword option 383 side the master 92
integervalidator 563 **kw 104 positioning widgets 90
interior 75, 163, 559, 565, tab groups 301
L Leave 99, 245, 618
566, 569, 581, 594, 598 LeaveNotify 97
Internet addresses 117 Label 21, 35, 86, 309, 495 LED 120, 200
interpreter 27, 103 shared options 496 length 523
IntVar 103, 152, 160 widget 408 lib-dynload 319
invalidcommand 561 widget standard lift 240, 242, 248, 309, 310,
invariant subexpression 351 options 408 581
invoke 41, 240, 455, 484, Light Emitting Diode 120
label 523, 546, 547, 550, 555, line cards 199
505, 521, 548, 551, 559, 563, 566, 575, 585, 591, line options 390
564, 585, 591, 609 593, 595, 597, 599, 602, line segments 250
ipadx 185, 493, 512 608 Listbox 45, 497
ipady 185, 493, 512 activate 499
isinitoption 569 labelchildsite 566 bbox 499
itemcget 209, 214, 234, 462 LabeledWidget 58, 565 curselection 499
itemconfig 124, 234 delete 499
itemconfigure 462, 469, 471, components 566 exportselection 498
472, 474, 475, 477, 478, hull 566 get 499
480, 481 interior 566 index 499
items 584, 598 label 566 indices 396
iterating through dictionary labelchildsite 566 insert 499
entries 8 methods 566 nearest 499
iterating through members 6, 7 options 565 scan_dragto 500
labelmargin 142, 547, 549, scan_mark 500
J 554, 561, 565, 574, 584, see 500
590, 592, 594, 596, 599, selection_anchor 500
joinstyle 473 601, 607 selection_clear 500
jump 526 labelpos 142, 547, 550, 554, selection_includes 500
justify 429, 479 561, 566, 574, 584, 590, selection_set 500
592, 594, 596, 599, 601, selectmode 498
K 607 setgrid 498
lambda 20, 25, 26, 91, 103 shared options 497
Key 99, 618 avoiding lambda size 500
keybindings 307 widget 395–397
keyboard events 97, 300, 301 expressions 103 widget methods 396
keyboard focus 300, 303, 307 definition 103 widget standard
KeyPress 97, 99, 101, 247, 618 expressions 103
KeyPress-space 209 function 106 options 395
KeyRelease 97, 101, 247 when to use 103
layout 77
calculating positions 92
INDEX 641
Listbox (continued) bitmap image type 416 Grid options 421
widget-specific Bitmap options 389, 416 Image methods 416
options 396 Button widget standard Image options 389
xview_moveto 500 Label widget standard
xview_scroll 500 options 405
yscrollcommand 498 Button widget-specific options 408
yview_moveto 501 line options 390
yview_scroll 501 options 405 Listbox indices 396
Canvas item types 388 Listbox widget
listbox 599 Canvas methods 386
listheight 550 Canvas postscript methods 396
lists 5 Listbox widget standard
options 393
appending 5 Canvas widget standard options 395
concatenating 6 Listbox widget-specific
deleting a member 7 options 385
indexing 6 Canvas widget-specific options 396
initializing 5 Menu indices 398
inserting a member 7 options 386 Menu widget
iterating through Checkbutton
methods 398
members 6 methods 407 Menu widget specific
membership 6 Checkbutton widget stan-
modifying members 6 options 398
sorting and reversing 6 dard options 406 Menu widget standard
local variable 10, 138, 351, Checkbutton widget-
355 options 397
Lock 617 specific options 407 Menubutton widget stan-
lower 310, 437 create arc 388
lowercommand 578 create bitmap 389 dard options 409
create image 389 Menubutton widget-spe-
M create line 390
create oval 390 cific options 410
MacOS 616 create polygon 391 Message widget standard
main thread 365 create rectangle 391
main toplevel 32 create text 392 options 410
mainCanvas 583 create window 392 Message widget-
mainloop 14, 96, 329, 437 Entry indices 394
make 316, 611, 612, 613 Entry types 398 specific options 411
Mandelbrot 271 Entry widget Oval options 390
map 98, 99, 356, 618 Pack methods 420
mapping methods 395 PhotoImage methods 417
Entry widget standard PhotoImage options 416
additional Menu PhotoImage type 416
options 399 options 393 place command 420
Entry widget-specific place methods 421
Arc options 388 Place options 420
Base text indices 401 options 394 Polygon options 391
Bind and event font methods 423 Radiobutton widget
Font options 422
methods 420 Frame widget standard methods 412
binding events 420 Radiobutton widget stan-
options 407
Frame widget-specific dard options 411
Radiobutton widget-spe-
options 408
grid command 421 cific options 412
Grid methods 422 Rectangle options 391
Scale widget methods 414
642 INDEX
Scale widget standard marshal.load 269 methods 570
options 412 marshaled data 271 options 570
mask MegaWidget 136, 156, 157, 571
Scale widget-specific components 571
options 413 stipple 244 methods 571
maskdata 452 member
Scrollbar widget maskfile 452 creating dynamically 9
methods 415 master 33 membership of a list 6
master widget 15, 78, 79 Menu 39, 501
Scrollbar widget standard master window 93 activeborderwidth 502
options 414 matrix operations 359 add_cascade 503
max 248, 265, 586, 607 add_checkbutton 503
Scrollbar widget-specific maximum 308 add_command 503
options 414 maxsize 308, 449 add_radiobutton 503
measure 490 add_separator 503
standard widget MegaArchetype 566 button commands 39
options 384 cascade 40
addoptions 567 checkbuttons 41
Text embedded image cget 567 delete 503
options 403 component 567 entrycget 504
componentaliases 567 entryconfigure 504
Text embedded window componentgroup 567 index 504
options 403 configure 567 indices 398
createcomponent 568 insert_cascade 504
Text index modifiers 402 createlabel 568 insert_checkbutton 504
Text options 392 destroycomponent 568 insert_command 504
Text tag specific hulldestroyed 568 insert_radiobutton 504
initialiseoptions 568 insert_separator 504
options 402 interior 569 invoke 505
Text tag standard isinitoption 569 post 505
methods 567 postcommand 502
options 402 options 569 Radiobutton 41
Text widget methods 403 MegaBar selectcolor 502
Text widget specific addcascademenu 572 shared options 501
addmenu 573 tearoff 502
options 401 addmenuitem 573 tearoffcommand 503
Text widget standard components 572 title 503
deletemenu 573 tk_bindForTraversal 505
options 400 deletemenuitems 573 tk_firstMenu 505
Tk special variables 385 disableall 573 tk_invokeMenu 505
Toplevel widget standard enableall 573 tk_mbPost 505
hull 572 tk_mbUnpost 505
options 415 methods 572 tk_nextMenu 505
Toplevel widget-specific MegaToplevel 569 tk_nextMenuEntry 505
activate 570 tk_popup 505
options 415 components 570
virtual events 420 hull 570
Window options 392
Winfo methods 417
wm operations 419
mapping class 5
mapping Tcl/Tk to
Tkinter 14
mapping Tk to Tkinter 383
mark_gravity 534
mark_names 534
mark_set 534
mark_unset 534
marshal.dump 270
INDEX 643
Menu (continued) entry 575 mouseless navigation 301
tk_traverseToMenu 505 helpmessage 575 move 244, 248, 260, 463
type 503, 505 hull 575, 577 moving canvas objects 243
unpost 506 icon 577 multiple callbacks 106
widget 397 label 575 multiple display devices 310
widget methods 398 message 575, 577 multiple inheritance 11, 21,
widget specific methods 575
options 398 options 574 139
widget standard resetmessages 575 multiple tasks 361
options 397 separator 577 mutex 365
yposition 506 MessageDialog 61, 576 mutual exclusion locks (See
options 576
menu 508, 540, 585 messagetypes 574 mutex)
MenuBar 59, 147, 148, 572 Microsoft Visual C++ 614, mwm 306
615
options 572 min 295, 586, 607 N
Menubutton 506 minimum 308
minsize 308, 449, 493 name mangling 11
cget 508 minuteentryfield 608 named argument 10
configure 508 mixin 126, 129, 139 names 491
direction 508 mixin classes 11 namespace 11, 27
indicatoron 508 modal dialog 141
menu 508 modifiedcommand 150, 561 variables 27
menubutton 508 modifier 98, 617 nametowidget 437
shared options 507 modifier keys 97 native widgets 13
widget 409 modifying dictionaries 8 navigation 184, 300, 307,
widget standard modifying members of a list 6
modifying tuples 7 347
options 409 module explicit 300
widget-specific Tkinter 12 image maps 305
module references 354 models 300
options 410 Monty Python’s Flying mouse 301
Message 42, 508 Circus 4 mouseless 301
Motif 13, 301, 303, 306, 341 pointer 300
aspect 510 Motion 618 traversal 303
cget 510 motion events 102, 242 using the TAB key 214
configure 510 MotionNotify 97 navigation models 300
message 510 mounting screws 201 nbframe 581
shared options 509 mouse 242, 301, 352 nearest 499
widget 410 mouse bindings 307 negotiation 78
widget standard mouse click 97 negotiation process 78
mouse drag 243, 352 nmake 615
options 410 mouse events 241 normal 308
widget-specific mouse movement 268 NoteBook 63, 578
mouse navigation 301 add 579
options 411 adding pages 174
message 96, 510, 544, 575, components 579
delete 579
577 getcurselection 579
MessageBar 59, 147, 148, hull 579
161, 574
buttonbox 577
components 575, 577
dialogchildsite 577
644 INDEX
index 579 notifications 96 options 584
insert 579 NotImplementedError 127 setitems 585
methods 579 numbuttons 548, 591 options 569
options 578 numeric keypad 347 ordered access 184
page 579 numericvalidator 563 orient 252, 523, 526, 547,
pagenames 579 NumPy 279 554, 586, 590
selectpage 580 os.listdir 91, 181
setnaturalpagesize 580 O os.path.join 179, 181
tab 580 os.path.splitext 193
notebook object os.unlink 273
adding pages 174 behavior 9 Ousterhout, John 12, 79
NoteBookR 61, 172, 173, grab handles 258 outline 203, 244, 249, 281,
580 inheritance 9 468, 475, 476, 478
add 581 outlinestipple 468
components 581 object descriptions 9 oval options 390
hull 581 Object-Oriented Analysis and overlay
initialise 581 image 215, 220
interior 581 Design (See OOAD) overlay techniques 233
lift 581 object-oriented interfaces 14 overrideredirect 32, 449
methods 581 Object-Oriented Program- overstrike 489
nbframe 581 ovwm 306
options 580 ming (See OOP)
pagecget 581 offsetY 582 P
pageconfigure 581 offvalue 483
pages 581 onvalue 483 pack 15, 20, 77, 187, 308,
raised 581 OOAD 120 340, 511, 512
tkdelete 581 OOP 9, 29, 120 after 511
tkraise 581 open file 193 before 511
NoteBookS 62, 173, 582 OpenView 306 command 420
addPage 583 operator.add 357 expand 511
components 583 optimized bytecode 350 fill 511
containerCanvas 583 option_add 89, 112, 113, in_ 511
delPage 583 ipadx 512
getPage 583 157, 437 ipady 512
hull 583 option_clear 437 methods 420
mainCanvas 583 option_get 437 pack 512
methods 583 option_readfile 49, 438 pack_forget 512
options 582 OptionMenu 64, 510, 511, pack_info 512
pageNames 583 pack_propagate 512
pages 583 584 pack_slaves 512
raised 584 components 585 padx 512
raisePage 583 get 585 pady 512
reBind 584 hull 585 side 512
tabCanvas 583 index 585
unBind 584 invoke 585 pack_forget 512
label 585 pack_info 512
menu 585 pack_propagate 512
menubutton 585
methods 585
OptionMenu 511
INDEX 645
pack_slaves 512 troughColor 439 update rate 109
Packer 78, 79, 86, 92 pane options 586 performance problems 102
PanedWidget 65, 181, 586 Persistence of Vision 232
anchor 84 PhotoImage 88, 89, 91, 150,
columns 85 add 587
expand 82 components 587 175, 179, 184, 192, 245,
fill 80, 82 configurepane 587 512, 514
hierarchical approach 86 insert 587 blank 514
operation 79 max 586 cget 514
packing list 79 methods 587 configure 514
pad 79, 84 min 586 copy 514
padx 84 options 586 data 513
pady 84 pane 587 file 513
parcel 79 Pane options 586 format 513
side 79 panes 587 gamma 513
packer 15 remove 587 get 514
packing list 79, 80 size 586 height 514
pad 493 panel devices 201 methods 417
padx 84, 430, 493, 512, 547, parallel tasks 361 options 416
554, 590, 607 parcel 79, 84 palette 514
pady 84, 430, 493, 512, 547, parent widget 78 put 515
554, 590, 607 parity 230 shared options 513
page 579 pdb 336 subsample 515
pageanchor 464 performance 107 type 416, 515
pagecget 581 byte code 349 width 515
pageconfigure 581 compiled C++ 348 write 515
pageheight 464 effect of event
pagemargin 578 format 515
pageNames 583 mechanism 107 from_coords 515
pagenames 579 effect of validating zoom 515
pages 581, 583 photo-realism 338
pagewidth 464 data 114, 119 pie charts 276, 289
pagex 464 filter 356 pieslice 290
pagey 464 initializing PIL 89, 91, 175, 271
palette 514 Image 88
activeBackground 439 applications 352 ImageEnhance 88
activeForeground 439 map 356 ImageTk 88
background 439 optimizer 350 pixel 273
disabledForeground 439 optimizing code 126 place 77, 516, 518
foreground 439 optimizing widget anchor 168, 516
highlightBackground 439 bordermode 516
highlightColor 439 creation 207 height 517
insertBackground 439 profiling 357 in_ 517
selectBackground 439 program organization 349 place 518
selectColor 439 programming for place_forget 518
selectForeground 439 place_info 518
performance 348 place_slaves 518
Python extensions 359
reduce 356
throttling events 352
Tkinter 350
646 INDEX
relheight 517 canvasColor 582 EntryField options 560
relwidth 517 canvasHeight 582 errorbackground 560
relx 168, 517 canvasMargin 592 extravalidators 560
rely 168, 517 canvasWidth 582 fliparrow 549
width 518 color 290 getting a component 113
x 518 ComboBox 52, 153, 340, Group 57, 564
y 518 Group options 564
place command 420 549 hexadecimalvalidator 563
place methods 421 ComboBox options 549 history 549
place options 420 ComboBoxDialog 53, 551 hscrollmode 592, 601
place_forget 176, 518 ComboBoxDialog iconmargin 543, 576
place_info 518 iconpos 543, 576
place_slaves 518 options 551 in-built validators 114
Placer 78, 90, 93 command 543, 552, 556, increment 554
Pmw xvii, 15, 21, 29, 31, 49, initialise 148
141, 375, 376 558, 560, 576, 584, 586, initialitem 584
AboutDialog 50, 147, 588, 590, 603, 605 INITOPT 156
Counter 54, 553 initwait 545, 554, 607
159, 542 Counter options 553 integervalidator 563
AboutDialog options 543 CounterDialog 55, 556 invalidcommand 561
activatecommand 543, CounterDialog items 584
options 556 LabeledWidget 58, 565
545, 551, 556, 558, 576, createcommand 578 LabeledWidget
588, 603, 605 creating a ButtonBox
activeColor 582 component 162 options 565
aligning labels 113 creating a Frame labelmargin 547, 549,
alphabeticvalidator 563 component 162
alphanumericvalidator 563 creating a Label 554, 561, 565, 574, 584,
applicationname 543 component 164 590, 592, 601, 607
autoclear 549 creating a text widget 189 labelpos 547, 550, 554,
autorepeat 553, 607 creating components 160 561, 566, 574, 584, 590,
Balloon 50, 147 creating new 592, 601, 607
borderframe 592, 601 megawidgets 73 listheight 550
borderwidth 578 data validation 114 longX 582
borderx 543, 551, 556, datatype 553 longY 582
576, 588, 603, 605 datevalidator 563 lowercommand 578
bordery 543, 551, 556, deactivatecommand 543, max 607
576, 588, 603, 605 545, 552, 557, 558, 576, MegaArchetype 566
buttonaspect 549, 553, 607 588, 603, 605 MegaToplevel 569
ButtonBox 51, 161, 546 deactiveColor 582 MegaToplevel
ButtonBox options 547 default button 603 options 570
buttonboxpos 543, 551, defaultbutton 543, 552, MegaWidget 156, 571
556, 558, 576, 588, 603, 557, 558, 576, 588, 606 MenuBar 59, 147, 572
605 Dialog 56, 558 MenuBar options 572
buttons 543, 551, 556, Dialog options 558 MessageBar 59, 147, 161,
558, 576, 588, 603, 605 dropdown 549 574
buttontype 590 EntryField 56, 111, 142, MessageBar options 574
559
INDEX 647
Pmw (continued) scrollmargin 592, 601 polling 215
MessageDialog 61, 576 selectioncommand 550 polygon 133
MessageDialog SelectionDialog 71, 603 polygon options 391
options 576 SelectionDialog popup 550
messagetypes 574 popup dialogs 144
min 607 options 603 positional 10
modifiedcommand 561 selectmode 590 positionfrom 450
NoteBook 63, 578 separatorrelief 586 positioning widgets 90
NoteBook options 578 separatorwidth 543, 552, post 505
NoteBookR 172, 580 postcommand 502
NotebookR 61 557, 558, 577, 588, 603, PostScript 244, 250, 251, 463
NoteBookR options 580 606 POV-Ray 232, 346
NoteBookS 62, 173, 582 setting initial values 156 precise window placement 92
NoteBookS options 582 shadeColor 582 preemption 364
numericvalidator 563 shortX 582 primary colors 345
offsetY 582 shortY 582 print 99
OptionMenu 64, 584 silent 575 print statements 333
OptionMenu options 584 state 545 private methods 11
orient 547, 554, 586, 590 statuscommand 545 private variables 11
padx 547, 554, 590, 607 tabColor 582
pady 547, 554, 590, 607 tabHeight 582 emulating 11
pagemargin 578 tabPos 578 profile 357
PanedWidget 65, 181, tagindent1 564 profile.run 357, 358
586 textColor 582 profiler 358
PanedWidget options 586 TextDialog 72, 605 profiling an application 357
PromptDialog 66, 587 TextDialog options 605 program organization 349
PromptDialog textFont 582 programming for
options 588 TimeCounter 73, 607
RadioSelect 66, 239, 589 TimeCounter options 607 performance 348–360
RadioSelect options 590 timevalidator 563 ProgressBar 161
raisecommand 578 title 543, 545, 552, 557, PromptDialog 66, 587
repeatrate 554, 607 559, 577, 588, 604, 606
ScrolledCanvas 67, 592 usehullsize 592, 601 buttonbox 588
ScrolledCanvas validate 561 components 588
options 592 value 561, 607 deleteentry 589
ScrolledField 68, 594 vscrollmode 593, 601 dialogchildsite 589
ScrolledField options 594 xoffset 545 entryfield 589
ScrolledFrame 69, 595 yoffset 545 hull 589
ScrolledFrame Pmw reference 542–609 indexentry 589
options 595 Pmw widgets 542–609 insertentry 589
ScrolledListBox 70, 598 Pmw.Color.spectrum 290 methods 589
ScrolledListBox point 273 options 588
options 598 pointer 300, 302 separator 589
ScrolledText 70, 149, 600 pointer events 97 propagated events 106
ScrolledText options 601 pointer motion 97 protocol 309, 450
pointing devices 301 methods 309
pointSize 48 WM_DELETE_
WINDOW 309
648 INDEX
WM_SAVE_YOURSELF extending in C/C++ 313 Radiobutton widget standard
309 extensions 359 options 411
features 4
WM_TAKE_FOCUS 309 format strings 321 Radiobutton widget-specific
protocol methods 309 generating code 195 options 412
protocols 309 install directory 612
prototypes 13, 343 interactive session 27 RadioSelect 66, 88, 89, 239,
public methods 11 Modules/Setup 612 241, 589
public variable 11 Python.h 314 add 591
put 515 reducing code components 590
putpalette 273 deleteall 591
Py 315 complexity 126 frame 590
Py_BuildValue 315 reference counst 324 getcurselection 591
Py_Initialize 325, 326 source 610 hull 590
Py_InitModule 315, 316 Tkinter 12 index 591
PyArg_ParseTuple 315, 319, unpacking tuples 212 invoke 591
user environment 376 label 591
321, 327 writing extension methods 591
PyDict_GetItemString 327 numbuttons 591
PyErr_SetString 320 modules 313 options 590
PyExc_TypeError 320 Python Imaging Library 89
PyFloat_AsDouble 320 Python MegaWidgets (See raise 242
PyFloatObject 320 raisecommand 578
PyImport_ImportModule Pmw) 29 RAISED 33
python.exe 374 raised 581, 584
326, 327 Python.h 314, 318 raisePage 583
PyList_Check 320 PYTHONPATH 319, 378 random.choice 109
PyList_GetItem 320 PyTuple_Check 327 ray tracing 232
PyList_Size 320 ray-traced 233
PyMethodDef 315 Q ray-traced image 305
PyObject 315, 320 read 193
PyObject_CallMethod 326, qualifier 98, 619 realvalidator 563
quit 438 reBind 584
327 recolorborders 580
PyObject_GetAttrString 326 R rectangle options 391
PyRun_SimpleFile 325 reduce 356, 357
PyRun_SimpleString 325 Radiobutton 37, 519 reference counts 324
Python 374 deselect 521 refresh 245
flash 521 region
__tkinter 12 indicatoron 38, 520
API 314, 315 invoke 521 caching locations 198
binary distribution 611 select 522 registering events 97
building extensions 316 selectcolor 521 relative placement 91
building Tkinter 612 shared options 520 relative placing 92
embedding Python 313 value 521 relative positioning 201
embedding the variable 521 Release 319
relheight 517
interpreter 325 Radiobutton widget 411 relief 203, 341, 427
environment 375 Radiobutton widget
environment variables 613 FLAT 33
exceptions 356 methods 412
INDEX 649
relief (continued) get 524 repeatdelay 526
GROOVE 33 identify 525 repeatinterval 527
RAISED 33 label 523 set 527
RIDGE 33 length 523 shared options 525
SOLID 33 orient 523 troughcolor 527
SUNKEN 33 repeatdelay 523 widget 414
repeatinterval 524 widget methods 415
relwidth 517 resolution 524 widget standard
relx 168, 205, 517 set 525
rely 168, 205, 517 shared options 522 options 414
remove 176, 587 showvalue 524 widget-specific
reparent 98 sliderlength 524
repeatdelay 523, 526 sliderrelief 524 options 414
repeatinterval 524, 527 tickinterval 524 scrollbar 251
repeatrate 554, 607 to 524
reposition 598 troughcolor 524 adding dynamically 151
resetmessages 575 variable 524 orient 252
resizable 308, 450 scale 465 xview 252
resize behavior 307 Scale widget 412 scrolled widgets 346
resizescrollregion 594 Scale widget methods 414 ScrolledCanvas 67, 592
resolution 524 Scale widget standard bbox 593
Return 116 options 412 borderframe 593
reverse video 107, 345, Scale widget-specific canvas 593
options 413 components 593
346 scaling images 90 horizscrollbar 593
reverse-lookup 264 scan_dragto 252, 253, 465, hull 593
RGB values 48 487, 500, 534 interior 594
RIDGE 33 scan_mark 252, 253, 465, label 593
ring 565 487, 500, 534 methods 593
ripple 154, 352 scrapbook 90 options 592
ripple callback 154 screen 310, 540 resizescrollregion 594
root window 97 screen layout 77 vertscrollbar 593
rotate 464 screen resolution 343, 346 ScrolledField 68, 594
row 79, 87, 116, 117, 301, Scriptics Corporation 13 components 594
scripts 13 entry 594
493 Scrollbar 45, 252, 525 hull 595
rowconfigure 252 activate 527 label 595
rowspan 89, 494 activerelief 526 labelmargin 594
rubber lines 237 delta 527 labelpos 594
elementborderwidth 526 methods 595
S fraction 527 options 594
get 527 text 594
sans serif font 340, 343 identify 527 ScrolledFrame 69, 595
Scale 46, 109, 110, 522 jump 526 borderframe 595, 597
orient 526 clipper 597
bigincrement 523 components 597
coords 524 frame 597
digits 523 horizflex 596
from 523
650 INDEX
horizfraction 596 components 601 selectioncommand 154, 550,
horizscrollbar 597 exportfile 602 599
hscrollmode 596 get 602
hull 597 horizscrollbar 601 SelectionDialog 71, 603
interior 598 hull 602 buttonbox 604
label 597 importfile 602 components 604
labelmargin 596 label 602 dialogchildsite 604
labelpos 596 methods 602 hull 604
methods 598 options 601 options 603
options 595 settext 602 separator 604
reposition 598 text 602
scrollmargin 596 vertscrollbar 602 selectitem 88, 153, 551
usehullsize 596 scrollmargin 592, 596, 599, selectmode 498, 590
vertflex 596 601 selectpage 580
vertfraction 597 scrollregion 252, 457 self 10
vertscrollbar 597 search algorithm 262 semaphore 365
vscrollmode 597 secondentryfield 608 send 438
ScrolledListBox 70, 598 segmentation violation 325 send_event 101
bbox 600 select 372, 484, 522 separator 544, 552, 557, 559,
components 599 select_adjust 465
dblclickcommand 598 select_clear 465 577, 589, 604, 606
get 600 select_from 465 separatorrelief 586
getcurselection 600 select_item 465 separatorwidth 543, 552,
horizscrollbar 599 select_to 466
hscrollmode 598 selectbackground 175, 430, 557, 558, 577, 588, 603,
hull 599 439 606
items 598 selectborderwidth 175, 430 sequence classes 5
label 599 selectColor 439 serial communications 221
labelmargin 599 selectcolor 483, 502, 521 serial protocol 223, 230
labelpos 599 selectforeground 175, 430, serif fonts 343
listbox 599 439 server 363
methods 600 selectimage 483, 521 set 109, 152, 525, 527
options 598 selection_adjust 488 setattr 133, 217
scrollmargin 599 selection_anchor 500 setdefault 548
selectioncommand 599 selection_clear 438, 488, 500 setentry 564
setlist 600 selection_from 488 setgrid 498, 530
size 600 selection_get 438 setink 273
usehullsize 599 selection_handle 438 setitems 585
verscrollbar 600 selection_includes 500 setlist 153, 600
vscrollmode 599 selection_own 438 setnaturalpagesize 580
ScrolledText 23, 24, 70, 149, selection_own_get 438 settext 602
150, 151, 600 selection_present 488 setting application-wide
bbox 602 selection_range 193, 488 attributes 49
borderframe 601 selection_set 500 setting the order in tab
clear 602 selection_to 488 group 303
setvar 439
shadeColor 582
shared-object files 374
Shift 617
INDEX 651
show 487 stack 336 tabcanvas 583
showerror 141, 143, 145 stacking 307 tabcolor 582
showinfo 141, 143 stacking order 97 tabheight 582
showstatus 546 standard application tabpos 578
showvalue 524 tabs 531
showwarning 141, 143 framework 155 tag 565
side 79, 80, 81, 82, 85, 512 standard dialogs 140, 141, 142
silent 575 standard widget options 384 removing 134
simple graphs 276 start 290, 368, 468 tag_add 535
single-shot forms 146 start_new_thread tag_bind 178, 233, 252, 255,
single-step 329
siomodule 229 arguments 363 466, 535
size 489, 500, 551, 586, 600 start-up time 349 tag_cget 535
size considerations 346 state 308, 431, 451, 545 tag_config 26
sizefrom 450 *static* 316 tag_configure 535
slant 48, 490 statuscommand 545 tag_delete 536
slave widget 78, 79 statushelp 247 tag_lower 466, 536
sliderlength 524 Stichting Mathematisch Cen- tag_names 536
sliderrelief 524 tag_nextrange 536
smart widgets 340 trum (CWI) 4 tag_prevrange 536
smooth 249, 279, 281, 473, sticky 87, 89, 116, 117, 145, tag_raise 467, 537
tag_ranges 537
476 494 tag_remove 537
smoothed curves 244 stipple 249, 256, 281, 469, tag_unbind 467, 537
smoothing 250 tagbind 546
snapping to a grid 257 474, 475, 476, 478, 479 tagindentl 564
SNMP 199, 347 stipple masks 244 tags 249, 469, 470, 471, 474,
SNMP poll 215 stream 372
SNMP traps 108 stretching canvas objects 258 475, 476, 478, 479, 480
Social Security 113 string.atof 227 tagunbind 546
Social Security numbers 117 string.split 113, 265 takefocus 98, 100, 233, 302,
socket select 372 string.strip 227
SOLID 33 string.upper 150 427
sort 269 StringVar 20, 152, 177, 196 Tcl/Tk 12
sorting and reversing lists 6 strip charts 296
sorting dictionaries 8 Stuffit 616 binary distribution 611
source window 97 style 290, 469 converting to Tkinter 237
spacing1 530 subclass 129 environment variables 613
spacing2 530 subsample 515 library 13
spacing3 530 SUNKEN 33 source distribution 611
spanning rows and superclasses 11 TCL_LIBRARY 378
SWIG 314 TCP 372
columns 87 switches 133, 138 tearoff 502
special widgets 120 tearoffcommand 503
speed drawing 271 T telephone numbers 117
splinesteps 281, 473, 476 Text 43, 189, 190, 304, 528
SqueezeTool 379 tab 580 bbox 532
tab group 301 debug 532
delete 532
setting the order 303 dlinein 533
Tab key 302 exportselection 529
652 INDEX
embedded image tk_textIndexCloser 537 threading 361
options 403 tk_textResetAnchor 537 threads without GUIs 362
tk_textSelectTo 537 3-D graphs 292
embedded window widget 400 threshold alarm 298
options 403 widget methods 403 throttling events 352
widget specific thumbnail 89, 91
get 533 tickinterval 524
image_cget 533 options 401 time.sleep 362
image_configure 533 widget standard TimeCounter 73, 607
image_names 533
index 533 options 400 components 608
index modifiers 402 widgets 304 decrement 608
indices 401 window_cget 537 downhourarrow 608
insert 533 window_configure 537 downminutearrow 608
insertbackground 529 window_create 538 downsecondarrow 608
insertborderwidth 529 window_names 538 frame 608
insertofftime 529 wrap 531 getint 609
insertontime 529 xview_moveto 538 getstring 609
insertwidth 530 xview_scroll 538 hourentryfield 608
mark_gravity 534 yscrollcommand 532 hull 608
mark_names 534 yview_moveto 538 increment 609
mark_set 534 yview_scroll 538 invoke 609
mark_unset 534 text 431, 479, 594, 602 label 608
scan_dragto 534 object 254 methods 608
scan_mark 534 options 392 minuteentryfield 608
see 534 tag 26 options 607
setgrid 530 textColor 582 secondentryfield 608
shared options 528 TextDialog 72, 605 uphourarrow 608
spacing1 530 buttonbox 606 upminutearrow 608
spacing2 530 components 606 upsecondarrow 608
spacing3 530 dialogchildsite 606 timers and background
tabs 531 hull 606 procedures 107
tag specific options 402 methods 606 timeslice 364
tag standard options 402 options 605 timestamps 334, 371
tag_add 535 scrolledtext 606 timevalidator 563
tag_bind 535 separator 606 title 22, 451, 503, 543, 545,
tag_cget 535 textFont 582 552, 557, 559, 577, 588,
tag_configure 535 textvariable 152, 177, 431 604, 606
tag_delete 536 this 10 Tk mapping 383
tag_lower 536 thread 96, 361–373 Tk special variables 385
tag_names 536 main thread 365 Tk to Tkinter 383
tag_nextrange 536 mutex 365 Tk widgets 14
tag_prevrange 536 semaphores 365 tk_bindForTraversal 505
tag_ranges 537 updating screens 368 tk_bisque 439
tag_remove 537 worker_thread 366 tk_firstMenu 505
tag_unbind 537 thread.start_new_thread 362, tk_focusFollowsMouse 439
tk_textBackspace 537 365
INDEX 653
tk_focusNext 439 Tkinter class hierarchy 16 widget-specific
tk_focusPrev 439 Tkinter Life Preserver xv options 415
tk_getMenuButtons 505 Tkinter performance 350
tk_invokeMenu 505 Tkinter widget 29, 31–76 toplevel
TK_LIBRARY 378 child 32
tk_mbButtonDown 505 Canvas 44 main 32
tk_mbPost 505 Checkbutton 38 transient 32
tk_mbUnpost 505 Entry 37 undecorated 32
tk_menuBar 439 Frame 33
tk_nextMenu 505 Label 35 top-level shell 301
tk_nextMenuEntry 505 Listbox 45 top-level widget 78
tk_popup 505 Menu 39 toplevel window level 105
tk_setPalette 439 Message 42 transforming colors 130
tk_strictMotif 439 Radiobutton 37 transient 451
tk_textBackspace 537 Scale 46 transient toplevel 32
tk_textIndexCloser 537 Scrollbar 45 transparent fill 235
tk_textResetAnchor 537 Text 43 transparent GIF image 220
tk_textSelectTo 537 Toplevel 32 traversal 303
tk_traverseToMenu 505 Tkinter widget Tree 181
tk_traverseWithinMenu 505 appearance 31 tree 182
tkButtonDown 455 tkMessageBox trigonometric operations 359
tkButtonEnter 455 askyesno 141 troughcolor 439, 524, 527
tkButtonInvoke 455 showerror 141 try ... except 330
tkButtonLeave 455 showinto 141 tuples 5, 7
tkButtonUp 455 showwarning 141
tkdelete 581 TkPlotCanvas xvii initializing 7
tkFileDialog 271 tkraise 440, 581 iterating through
Tkinter tkSimpleDialog 141, 142
askfloat 141 members 7
class constructors 14 askinteger 141 modifying 7
common options 425 askstring 141 type 98, 453, 467, 503, 505,
creating large numbers of to 524 515
toggle 484
widgets 125 toggle switch 136 U
creating widgets in a Toplevel 32, 307, 539
class 540 UART 230
loop 212 colormap 540 UDP 372
drawing polygons 132 container 540 UML editor 275
environment variables 613 menu 540 unbind 104, 105, 440, 546,
how to handle variable screen 540
shared options 539 584
widgets 133 use 540 unbind_all 440
initializing 158 visual 541 unbind_class 106, 440
introduction 12–17 widget 415 undecorated 32
performance 13 widget standard underline 39, 431, 490
reference 425–541 unique 550
strict Motif mode 301 options 415 UNIX
variable 20
_tkinter 13, 15 linking dynamically 317
linking statically 316
UNIX CDE 344
654 INDEX
Unmap 98, 618 variable 20, 108, 483, 521, Canvas line 472
unpost 506 524 Canvas oval 474
unrecognized event 101 BooleanVar 108, 152 Canvas polygon 476
uparrow 556 DoubleVar 109, 152 Canvas rectangle 477
update 440 get 152 Canvas text 478
update_display 169 IntVar 152 Canvas window 480
update_idletasks 107, 110, set 152 Checkbutton 481
StringVar 152, 177, 196 classes 120
111, 193, 440 textvariable 177 common methods 433
uphourarrow 608 composites 120, 136
upminutearrow 608 Variable class 108, 152 data verification 111
upsecondarrow 608 variable data 133 default value 154
use 540 vertflex 596 Entry 484
use of the ripple vertfraction 597 events 104
vertical scroll bar 151 Font class 489
technique 154 vertscrollbar 593, 597, 600, formatted 117
usehullsize 592, 596, 599, Frame 491
602 hex nut 131
601 virtual events binding 420 hierarchy 16
user-defined data type 9 virtual machines 232, 346 inherited methods 310
using labels to bind events 35 virtual reality 338 Label 495
using print to debug Visibility 98 LED 200
visibility methods 308 lift 242
applications 329 visual 492, 541 Listbox 497
using the Python vscrollmode 593, 597, 599, mapping 383
master 78, 79
optimizer 350 601 Menu 501
Menubutton 506
V W Message 508
notebook 172
valid 564 wait_variable 440 nut 131
validate 112, 115, 561 wait_visibility 440 OptionMenu 510
validating input 111 wait_window 440 options shared by most
validation 107, 111, 116 warning or error
widgets 426
date 113, 117 messages 141 overriding default
defining requirements 165 webpages 191
errors 113 weight 48, 490, 494 behavior 106
IP address 114, 117 widget PhotoImage class 512
social security Radiobutton 519
alignment 301 raise 242
number 113 animation 123, 134 relief 124
Social Security behavior 104 reverse video 107
behavior of ripple Scale 522
numbers 117 Scrollbar 525
telephone numbers 117 function 154 setting background
times 117 Button 453
validation error 113 Canvas 456 color 154
validation function return Canvas Arc 468
values 560 Canvas bitmap 470
validator 112, 115, 561 Canvas image 471
value 521, 561, 607
value changed callback 150
INDEX 655
widget (continued) option_clear 437 highlightthickness 426
slave 78, 79 option_get 437 image 429
smart 117 option_readfile 438 justify 429
smart widget 340 quit 438 padx 430
special 120 selection_clear 438 pady 430
Text 528 selection_get 438 relief 427
textvariable 152 selection_handle 438 selectbackground 430
Toplevel 539 selection_own 438 selectborderwidth 430
tree 181 selection_own_get 438 selectforeground 430
validation 107 send 438 state 431
variable 152 setvar 439 takefocus 427
wm methods 446 tk_bisque 439 text 431
tk_focusFollowsMouse textvariable 431
widget appearance 17 underline 431
widget common methods 439 width 427
tk_focusNext 439 wraplength 432
after 433 tk_menuBar 439 xscrollcommand 432
after_cancel 434 tk_setPallette 439 yscrollcommand 433
after_idle 434 tk_strictMotif 439 Widget.bind 246
bell 434 tkraise 440 width 427, 453, 464, 515,
bind 434 unbind 440 518
bind_class 434 unbind_all 440 window 480
bindtags 434 unbind_class 440 background color 341
cget 434 update 440 behavior 307
clipboard_append 434 update_idletasks 440 controlling ability to resize
clipboard_clear 435 wait_variable 440
destroy 435 wait_visibility 440 window 308
event_add 435 wait_window 440 controls 307
event_delete 435 widget options decoration 307
event_generate 435 activebackground 428 destroying 94
event_info 435 activeforeground 428 dynamic creation 78
focus_display 435 anchor 428 focus 300
focus_force 436 background 426 getting the current
focus_lastfor 436 bd 426
focus_set 436 bg 426 state 308
getboolean 436 bitmap 428 grab 97
getvar 436 borderwidth 426 hiding a window 308
grab_current 436 command 429 icon 308
grab_release 436 cursor 426 information 417
grab_set_global 436 disabledforeground 429 menu 307
grab_status 437 fg 426 maximum size 308
image_names 437 font 426 minimum size 308
keys 437 foreground 426 naming an icon 309
lower 437 height 429 resizing 91
mainloop 437 highlightbackground 426 setting a color bitmap 309
nametowidget 437 highlightcolor 426 setting two-color
option_add 437
icon 309
656 INDEX
sizing a window 81 winfo_manager 442 winfo_fpixels 255, 441
title 307 winfo_name 442 winfo_geometry 442
visibility 308 winfo_parent 442 winfo_height 239, 293, 442
window appearance 307 winfo_pathname 442 winfo_id 442
window boundary 97 winfo_pixels 443 winfo_interps 442
window coordinates 91 winfo_pointerx 443 winfo_ismapped 442
window decoration 307 winfo_pointerxy 443 winfo_manager 442
window manager 14, 78, 300, winfo_pointery 443 winfo_name 442
306, 419 winfo_reqwidth 443 winfo_parent 442
dtwm 306 winfo_rgb 130, 443 winfo_pathname 442
mwm 306 winfo_rootx 443 winfo_pixels 255, 443
negotiation 78 winfo_rooty 443 winfo_pointerx 443
ovwm 306 winfo_screen 444 winfo_pointerxy 443
positioning windows 307 winfo_screencells 444 winfo_pointery 443
sizing windows 307 winfo_screendepth 444 winfo_reqwidth 443
wm.geometry 81 winfo_screenheight 444 winfo_rgb 130, 294, 443
window options 392 winfo_screenmmheight winfo_rootx 443
window_cget 537 winfo_rooty 443
window_configure 537 444 winfo_screen 444
window_create 43, 538 winfo_screenmmwidth winfo_screencells 444
window_names 538 winfo_screendepth 444
Windows 444 winfo_screenheight 444
binary distribution 614 winfo_screenvisual 444 winfo_screenmmheight 444
coordinates 91 winfo_screenwidth 444 winfo_screenmmwidth 444
events 96 winfo_server 444 winfo_screenvisual 444
linking dynamically 318 winfo_toplevel 444 winfo_screenwidth 444
linking statically 317 winfo_viewable 444 winfo_server 444
message 96 winfo_visual 444 winfo_toplevel 444
source distribution 614 winfo_visualid 445 winfo_viewable 444
Windows SDK 16 winfo_visualsavailable winfo_visual 444
winfo winfo_visualid 445
winfo_atom 440 445 winfo_visualsavailable 445
winfo_atomname 441 winfo_vrootheight 445 winfo_vrootheight 445
winfo_cells 441 winfo_vrootwidth 445 winfo_vrootwidth 445
winfo_children 441 winfo_vrootx 445 winfo_vrootx 445
winfo_class 441 winfo_vrooty 445 winfo_vrooty 445
winfo_colormapfull 441 winfo_width 445 winfo_width 239, 293, 445
winfo_containing 441 winfo_x 445 winfo_x 445
winfo_exists 441 winfo_y 445 winfo_y 445
winfo_fpixels 441 Winfo methods 417 withdraw 147, 308, 451
winfo_geometry 442 winfo_atom 440 withdrawn 308
winfo_height 442 winfo_atomname 441 withtag 257
winfo_id 442 winfo_cells 441 wizards 184–190
winfo_interps 442 winfo_children 441 wm 306, 446–451
winfo_ismapped 442 winfo_class 441
winfo_colormapfull 441 aspect 446
winfo_containing 441
winfo_depth 441
INDEX 657
wm (continued) wm operations 419 xscrollcommand 432
client 446 wm.geometry 81 xscrollincrement 458
colormapwindows 446 WM_DELETE_WINDOW XtAppAddInput 370
command 447 XtAppAddTimeOut 369
deiconify 447 309, 310 XtAppAddWorkProc 369
focusmodel 447 wm_iconify 448 xview 252, 488
frame 447 WM_SAVE_YOURSELF xview_moveto 467, 488, 500,
geometry 447
group 448 309, 310 538
iconbitmap 448 WM_TAKE_FOCUS 309, xview_scroll 467, 488, 500,
iconmask 448
iconname 448 310 538
iconposition 448 worker_thread 366
iconwindow 449 wrap 531 Y
maxsize 449 wraplength 432
minsize 449 write yoffset 545
overrideredirect 449 yposition 506
positionfrom 450 file 515 yscrollcommand 252, 433,
protocol 450 writing a Python
resizable 450 458, 498, 532
sizefrom 450 extension 313 yscrollincrement 458
state 451 www.python.org 611, 614, 616 yview 252
title 451 www.scriptics.com 611 yview_moveto 467, 501, 538
transient 451 yview_pickplace 538
withdraw 451 X yview_scroll 467, 501, 538
wm_iconify 448
x 464, 518 Z
wm methods 310 X Window behavior 77
X Window system 13 zoom 515
X Window System font
descriptors 47
.Xdefaults 49
xoffset 545
658 INDEX
PROGRAMMING/PYTHON
Python and Tkinter Programming John E. Grayson
T kinter (pronounced tea-kay-inter), the GUI package bundled “Packed with well-explained
with the Python programming language, is a clean, object- examples that teach good
oriented interface to the Tcl/Tk graphical toolkit. It enables Python habits.”
you to quickly write GUI code that runs with a native look and
feel on Unix, Macintosh, and Windows. —Guido van Rossum
Inventor of Python
Python and Tkinter Programming is a detailed introduction that
carefully leads you through the landscape. It makes Tkinter’s “This book is a winner. I’ll be
capabilities available to any reader who knows the basics of recommending it to a lot of
Python. It gives you real-world code that does real work—no toy readers.”
examples. And it documents Tkinter in a reference section that
you will find often helpful and always easy to use. —Cameron Laird
Columnist, SunWorld’s
Everything you need to add graphics to your applications is here, “Regular Expressions”
from a gentle introduction, to hard-working examples, to com-
prehensive, keyboard-side reference material. “Some very cool material is
covered here, which takes one
What’s inside well beyond the ‘yet another
collection of the same old
I A master’s advice on creating knock-out interfaces buttons and sliders’ stuff.”
I Graphs, blobs, rubber-lines, trees, machines, threads, …
I Controls such as drawn interfaces, photorealistic panels, —Garry Hodgson
Technology Consultant
and many more
I How to debug in Python and how to tune performance “Using chapters from this
I Reference section with all classes, methods, options book, interns here at General
Dynamics were producing
John Grayson can recite by heart any scene from Monty Python and knockout GUIs in a week …”
the Holy Grail. He has a Ph.D. in molecular biology and has been
putting Python to work since 1993. He has built large-scale —Gordon Smith
Python applications and innovative user-interfaces for state General Dynamics
governments, airlines, and telecommunication companies.
AUTHOR Author responds on the Web
to questions from our readers
ONLINE www.manning.com/grayson
M A N N I N G $49.95 US/$72.95 Canada ISBN 1-884777-81-3