OpenCCG / openccg

OpenCCG library for parsing and realization with CCG
http://openccg.sourceforge.net/
Other
205 stars 45 forks source link

Updating ccg2xml to use Python 3 #19

Open shoeffner opened 5 years ago

shoeffner commented 5 years ago

This PR proposes to update the ccg_editor.py and all other ccg2xml files to Python 3. Note that this change breaks backwards compatibility as the scripts are no longer compatible with Python 2.

Tkinter now uses ttk instead of the plain tkinter. Before, in Python 3, the GUI was not working properly on MacOS. Now it works with MacOS and inside a (debian) Docker container, tunneling the X server to the host OS. I will test Windows support soon and report.

Note that this PR depends (loosely) on #18 and includes those commits as well. Thus, this PR closes #18 and also closes #16.

Even though this updates the ccg_editor.py (and thus visccg) heavily, it does not implement solutions for the missing panel "Rules", nor any more functionality for the Testbed panel, even if those are needed.

I didn't get line numbers in the main window to work, neither with the original Python 2 code nor with the updated Python 3 code. However, the code is still in there and maybe it can be fixed somehow, but that is outside the scope of this PR.

shoeffner commented 5 years ago

Some screenshots:

MacOS:

image

Debian via Docker/XQuartz on MacOS host:

image

Windows: TBD

dmhowcroft commented 5 years ago

Looks good to me, @mwhite14850

shoeffner commented 5 years ago

I found another two instances of the list() around items() calls and updated those (and the one reviewed above) accordingly.