-
Notifications
You must be signed in to change notification settings - Fork 45
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
shoeffner
wants to merge
11
commits into
OpenCCG:master
Choose a base branch
from
shoeffner:update/ccg_editor
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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.
Open
dmhowcroft
reviewed
Dec 30, 2018
Looks good to me, @mwhite14850 |
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
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.