uricamic / clandmark

Open Source Landmarking Library
http://cmp.felk.cvut.cz/~uricamic/clandmark
GNU General Public License v3.0
199 stars 111 forks source link

python2 to python3 #65

Closed jiapei100 closed 8 years ago

jiapei100 commented 8 years ago

Python2 to Python3

uricamic commented 8 years ago

Hi,

thanks for the pull request! Before merging it, since I am not a Python expert, I have to ask whether it is backwards compatible with Python2. If it is not, then I suggest creating a separate file for Python3.

SamyCookie commented 8 years ago

Hi, Change seem good to me. But I think it will be safer to prevent behaviour issues with print function by adding the future import, i.e. from __future __ import print_function

jiapei100 commented 8 years ago

To tell the truth, I only use a single command "2to3" to deal with the incompatibility ~ your original python code is clear enough... And, BTW, clandmark works fine. However, I seriously do NOT like rapidxml, particularly, when I realize there are some declaration faults. You can just change to libxml2 or xmlparser, etc.

uricamic commented 8 years ago

Ok, I am merging the changes then.

Yeah, I have chosen rapidxml just because it was the easiest solution at the given time, due to the portability (single header file, which can be distributed with the library). And since the XML requirements are quite limited, it remained as it is. Maybe in the future, I could look at the possibilities to change this.