Update custom application example.

It's running on both Python 2 and 3 now.
@matrixise good catch, I proposed the above change to fix it.