Bug 1052103: Fix template app.py for Python 3.3