Python coding style

Removed a not used import (sys)
and made the code follow the [PEP8](http://www.python.org/dev/peps/pep-0008/) python coding style.