Port code to Python3
Add dynamic support for both {Python,SublimeText} 2 and 3