Code profiling is an attempt to find bottlenecks in your code. Profiling is supposed to find what parts of your code take the longest. Once you know that, then you can look at those pieces of your code and try to find ways to optimize it. Python comes with three profilers built in: cProfile, profile […]
Python comes with its own debugger module that is named pdb. This module provides an interactive source code debugger for your Python programs. You can set breakpoints, step through your code, inspect stack frames and more. We will look at the following aspects of the module: How to start the debugger Stepping through your code […]
There are under 2 days left in the book campaign! I think that's pretty exciting. I hope you do too! I've been busy writing the new Part 3 lately. I only have two more chapters to go before it's done. My hope is that Part 3 will be done by the end of the week. […]
Python 3.4 released today (2014-03-17) and includes a lot of neat stuff. According to the Python Insider, these are the major changes / additions: PEP 428, a "pathlib" module providing object-oriented filesystem paths PEP 435, a standardized "enum" module PEP 436, a build enhancement that will help generate introspection information for builtins PEP 442, improved […]
Python includes a couple of modules for testing in its standard library: doctest and unittest. We will be looking at doctest in this article. The doctest module will search for pieces of text in your code that resemble interactive Python sessions. It will then execute those sessions to verify that they work exactly as written. […]
Kivy is an open source Python library for rapid development of applications that make use of innovative user interfaces, such as multi-touch apps. The Kivy organization is organizing its second application development contest.! This is a great chance for new and experienced users to show off their skills and compete for prizes. Entries will be […]