Python 3 compatibility

Operator <> has been deprecated on Python3.
Changed python code ocurrences of <> to != to make the module work on Py3.3

<> is also used as a relational operator on the code, but that should not be a problem.