add pep8 validation, and refactoring accoding to pep8

Signed-off-by: Kouhei Maeda <mkouhei@palmtb.net>
change print() to syntax with compatibility for python 3

Signed-off-by: Kouhei Maeda <mkouhei@palmtb.net>
Merge pull request #1 from mkouhei/master

refactoring according to pep8