ported to python 3

- ported the code to python 3 with `six` package (it does not break python2 compatibility).
- fixed indentation to standard 4 spaces (instead of 2 spaces)
- cleanups to follow PEP8 (like 2 lines after or before the class)

As we don't have tests just tried to import and run commands with `ipython` under python2 and python3. Works.

**Examples still should be updated to use 4 spaces indentation instead of 2 spaces**
And here