Use decorator to classmethod.

This script requires Python 2.6 or greater. So can use decorator
 instead re-bind function