add support for OTF files and use argparse instead of optparse

- optparse is deprecated, argparse is recommended
- made some changes for PEP8
   + tab = 4 spaces
   + no need for `\` in `()`
- move from python 2 to python 3