Book Image

Getting Started with Python and Raspberry Pi (Redirected from Learning Python By Developing Raspberry Pi Applications)

By : Dan Nixon
Book Image

Getting Started with Python and Raspberry Pi (Redirected from Learning Python By Developing Raspberry Pi Applications)

By: Dan Nixon

Overview of this book

Table of Contents (18 chapters)
Getting Started with Python and Raspberry Pi
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

Chapter 10. Debugging Applications with PDB and Log Files

In this chapter, we will learn more about how to debug Python code using the Python Debugger (PDB) tool and how we can use the Python logging framework to make complex applications written in Python easier to debug when they fail.

We will also look at the technique of unit testing and how the unittest Python module can be used to test small sections of a Python application to ensure that it is functioning as expected.

These techniques are commonly used in applications written in other languages and are good skills to learn if you are often going to be developing applications.

We will be making additions to the calculator application developed in Chapter 4, Understanding Object-oriented Programming and Threading; a copy of the code for this is included in the code for this chapter.