List of Figures

Chapter 1. Why Python?

Figure 1.1. Python.org’s download page

Figure 1.2. Are you sure you want to run this strange program from the internet? Yes!

Figure 1.3. Install Python for all users.

Figure 1.4. Choose Python’s location.

Figure 1.5. Choose which bits of Python you want.

Figure 1.6. Installing Python

Figure 1.7. Hooray! Python’s installed!

Figure 1.8. Here’s where Notepad lives.

Figure 1.9. The test program for Python

Figure 1.10. Save your test program to the desktop.

Figure 1.11. Run your script by double-clicking it.

Figure 1.12. Where the Windows command line lives

Figure 1.13. Windows doesn’t know where Python is!

Figure 1.14. Looking in your computer’s properties

Figure 1.15. Editing your system properties

Figure 1.16. Opening the PATH variable

Figure 1.17. Adding Python to your PATH variable

Figure 1.18. Success! Now Windows knows where Python is.

Figure 1.19. The permissions window for hello_world.py

Figure 1.20. Choosing what to do with your program

Figure 1.21. Your test program running in a terminal window under Ubuntu Linux

Figure 1.22. Setting the command in a launcher

Figure 1.23. Setting the new Python path properly

Figure 1.24. Setting the default action for Python files

Figure 1.25. Setting the Python Launcher as the default app

Chapter 2. Hunt the Wumpus

Figure 2.1. This isn’t a very fun game.

Figure 2.2. Adding cave 3 to your network

Figure 2.3. That’s much better!

Chapter 3. Interacting with the world

Figure 3.1. The four possibilities for differences between files

Figure 3.2. A test directory for the difference engine

Figure 3.3. test2, an almost identical copy of the first test directory

Chapter 4. Getting organized

Figure 4.1. The Test-Driven Development cycle

Chapter 5. Business-oriented programming

Figure 5.1. Python as a glue language, helping other programs “talk” to each other

Figure 5.2. Examining elements using Firebug

Figure 5.3. Using Firebug with highlighting

Figure 5.4. The structure of a HTML email

Figure 5.5. A diagram of a stack trace

Figure 5.6. The HTML changes if there’s no movement in the stock.

Chapter 6. Classes and object-oriented programming

Figure 6.1. Monsters are like the player, except with horns and a frowny face.

Figure 6.2. A basic sketch of your game

Figure 6.3. Some of the inheritance and composition in your game

Chapter 7. Sufficiently advanced technology...

Figure 7.1. A diamond inheritance structure

Figure 7.2. The iterator protocol: once you run through three iterations, it stops.

Figure 7.3. An Apache log line

Chapter 8. Django!

Figure 8.1. Setting system paths for Django

Figure 8.2. Django’s starting screen

Figure 8.3. “Hello world!”

Figure 8.4. Where’s my template?

Figure 8.5. Logging into Django’s admin system

Figure 8.6. Editing a todo in the Django admin interface

Figure 8.7. A form to add a todo

Figure 8.8. Your edit view

Chapter 9. Gaming with Pyglet

Figure 9.1. Installing Pyglet

Figure 9.2. A black screen

Figure 9.3. Your planet. Ideal for running into with your spaceship! (Image courtesy of NASA/JPL/Malin Space Science Systems)

Figure 9.4. Your spaceship

Figure 9.5. Turning the ship

Figure 9.6. x and y coordinates. x represents values that go left to right, and y represents values that go up and down.

Figure 9.7. The ship’s angle can have x and y parts.

Figure 9.8. Now you can drive your spaceship around. Brrm! Brrm!

Figure 9.9. Gravity applies a force to your ship.

Figure 9.10. Two different angles, same x position and distance

Figure 9.11. Your ship in orbit around the planet

Figure 9.12. The planet’s and ship’s collision circles

Figure 9.13. Your ship firing—ready to take on the alien armada

Figure 9.14. Die, alien scum!

Chapter 10. Twisted networking

Figure 10.1. Installing Twisted on Windows

Figure 10.2. A Factory creating protocols

Figure 10.3. Your chat server is running.

Figure 10.4. Bad monster! No beating on the player!

Figure 10.5. The Twisted class structure

Figure 10.6. Logging in to your game

Figure 10.7. The states in RegisteringTelnet-Protocol

Chapter 11. Django revisited!

Figure 11.1. Adding a user through Django’s admin screen

Figure 11.2. Your database is broken!

Figure 11.3. Changing the owner of a todo

Figure 11.4. Serving up images with Django

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.149.233.72