contents
Foreword
Preface
Acknowledgments
About this book
About Hello! books
- 1 Why Python?
- Learning to program
- What makes Python so great?
- Setting up Python for Windows
- Linux
- Macintosh
- Troubleshooting
- Text editors and IDEs
- Summary
- 2 Hunt the Wumpus
- What’s a program?
- Your first program
- Experimenting with your program
- Making the caves
- Fixing a more subtle bug
- Clean up your code with functions!
- Fixing the wumpus
- Bows and arrows
- More atmosphere
- Where to from here?
- Summary
- 3 Interacting with the world
- “Batteries included”: Python’s libraries
- Another way to ask questions
- Reading and writing files
- Comparing files
- Putting it all together
- Testing your program
- Improving your script
- Where to from here?
- Summary
- 4 Getting organized
- Planning: specifying your program
- How do you know your program works?
- Writing the program
- Putting your program together
- Taking stock
- Saving your work
- Editing and deleting
- Where to from here?
- Summary
- 5 Business-oriented programming
- Making programs talk to each other
- Getting started
- Downloading the page with Python
- Writing out to a CSV file
- Emailing the CSV file
- A simple script—what could possibly go wrong?
- How to deal with breaking scripts
- Exceptions
- Where to from here?
- Summary
- 6 Classes and object-oriented programming
- What exactly are classes?
- Object-oriented design
- Player input
- Treasure!
- Further into the caves
- Here there be monsters!
- Danger and excitement
- Where to from here?
- Summary
- 7 Sufficiently advanced technology…
- Object orientation
- Customizing classes
- Generators and iterators
- Using generators
- Functional programming
- Where to from here?
- Summary
- 8 Django!
- Writing web-based applications with Django
- Writing your application
- Using a model
- Making use of your data
- Final polishing
- Where to from here?
- Summary
- 9 Gaming with Pyglet
- Installing Pyglet
- First steps
- Starship piloting 101
- Gravity
- Guns, guns, guns!
- Evil aliens
- Where to from here?
- Summary
- 10 Twisted networking
- Installing Twisted
- Your first application
- First steps with your MUD
- Making the game more fun
- Making your life easier
- Making your world permanent
- Where to from here?
- Summary
- 11 Django revisited!
- Authentication
- Listing only your own todos
- Testing!
- Images and styles
- Where to from here?
- Summary
- 12 Where to from here?
- Read some more code
- Scratch your own itch
- Look at more Python libraries
- Summary
Index