Support python 2.7 and 3.0.

Signed-off-by: david <db@d1b.org>