List of Figures – The Quick Python Book

List of Figures

Chapter 2. Getting started

Figure 2.1. Basic interactive mode on Windows XP

Figure 2.2. IDLE on Windows

Figure 2.3. Using the Python shell in IDLE. Code is automatically colored (based on Python syntax) as it’s typed in. Here I typed f and then pressed Alt-/, and automatic completion finished the word factorial. I lost the prompt, so I pressed Ctrl-C to interrupt the interpreter and get the prompt back (a closed bracket would have worked here as well). Placing the cursor on any previous command and pressing the Enter key moves the command and the cursor to the bottom, where you can edit the command and then press Enter to send it to the interpreter. Placing the cursor at the bottom, you can toggle up and down through the history of previous commands using Alt-P and Alt-N. When you have the command you want, edit it as desired and press Enter, and it will be sent to the interpreter.

Chapter 5. Lists, tuples, and sets

Figure 5.1. A list with its first item referring to a nested list

Figure 5.2. The first item of the original list is still a nested list, but the nested variable refers to a different list.

Figure 5.3. A shallow copy doesn’t copy nested lists.

Chapter 8. Control flow

Figure 8.1. Indentation error

Chapter 9. Functions

Figure 9.1. At the beginning of function f(), both the initial variables and the function parameters refer to the same objects.

Figure 9.2. At the end of function f(), y (list1 inside the function) has been changed internally, whereas n and list2 refer to different objects.

Chapter 10. Modules and scoping rules

Figure 10.1. An IDLE edit window provides the same editing functionality as the shell window, including automatic indentation and colorization.

Figure 10.2. The order in which namespaces are checked to locate identifiers

Chapter 11. Python programs

Figure 11.1. A Windows shortcut

Chapter 15. Classes and object-oriented programming

Figure 15.1. Direct namespaces

Figure 15.2. Self variable namespaces

Figure 15.3. Inheritance hierarchy

Chapter 16. Graphical user interfaces

Figure 16.1. A minimal Tkinter application

Figure 16.2. A simple application

Figure 16.3. A widget window

Figure 16.4. A two-button window

Figure 16.5. Grid usage

Figure 16.6. A text window

Chapter 18. Packages

Figure 18.1. Organizing a math package

Figure 18.2. Example package

Chapter 24. Network, web, and database programming

Figure 24.1. How a WSGI application works with a server

Figure 24.2. The browser and server after a form POST

Figure 24.3. Browser and server after a message POST

Appendix Appendix

Figure A.1. int.html as generated by pydoc

Figure A.2. pydoc search dialog box

Figure A.3. A partial view of the module documentation served by pydoc

Figure A.4. Python documentation in a Windows Help file