fcd icon indicating copy to clipboard operation
fcd copied to clipboard

Make bindings.py 2-3 compatible

Open user202729 opened this issue 7 years ago • 0 comments

Fixes #47.

Running the code in Python 2 and 3 produces nearly the same output, the only difference is because hash function in Python 2 and 3 are different, which lead to different dict order. Replacing all {} with OrderedDict() from collections makes the output identical.

Besides, the cmake file should probably use https://cmake.org/cmake/help/latest/module/FindPython.html#module:FindPython to detect Python interpreter instead of just python.

The comment "I'm a Python 2 script" may be changed too. (to mention 2-3 compatibility)

user202729 avatar Sep 03 '18 02:09 user202729