Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updating ccg2xml to use Python 3 #19

Open
wants to merge 11 commits into
base: master
Choose a base branch
from

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