ses module: add backward-compatible support for Python 3.3+
Merge pull request #2354 from felixonmars/ses-py3

ses module: add backward-compatible support for Python 3.3+. Fixes #2354.