Skip to content

Conversation

@shoeffner
Copy link
Contributor

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.

Additionally removed some outdated imports and comments.
One "arg == None" was changed to "arg is None".
- Using 2to3 and some manual labor
   - Especially comments can be overlooked
- Updating lex.py and yacc.py
- Tested the changes with arabic.ccg
- The editor buttons are broken with this version
It still works fine inside a debian-docker container using XQuartz on
the host system.
Windows will be tested soon.
The content of Features and Testbed is presented properly again.
Before, only the last items were shown, as the indentation level was one
too few.
@shoeffner
Copy link
Contributor Author

Some screenshots:

MacOS:
image

Debian via Docker/XQuartz on MacOS host:
image

Windows:
TBD

@shoeffner shoeffner mentioned this pull request Nov 29, 2018
@dmhowcroft
Copy link
Contributor

Looks good to me, @mwhite14850

@shoeffner
Copy link
Contributor Author

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

most tabs in ccg-editor.py are empty

2 participants