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

revert winreg rename for kindlekey.pyw #1698

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

yukaritamura
Copy link

As the script isn't python3 compatible yet, we still need to
import _winreg to make it run at least with python2.7.

To make it run with python3, we need more works around
print and raise syntax.

As the script isn't python3 compatible yet, we still need to
import _winreg to make it run at least with python2.7.

To make it run with python3, we need more works around
print and raise syntax.
@ableeker
Copy link
Contributor

@yukaritamura what version of kindlekey.py have you been using? It looks like yours is 2.5, but the current version from DeDRM 7.2.1 is at version 3.0, and has definitely been converted to Python 3. I've just tried it again, I'm using Python 3 for this, and it's working fine as it is. Furthermore, the line you want to change back isn't even line 180 in version 3.0, it's 192 currently. I would strongly advise not to use this pull request.

@ableeker
Copy link
Contributor

ableeker commented Jul 3, 2021

I see where the confusion comes from, this isn't a fix for the kindlekey.py scripts that's from the plugin, this is a fix for the script kindlekey.pyw (note the extra 'w') that can be found in folder Other_Tools > DRM_Key_Scripts > Kindle_for_Mac_and_PC. While the files from the plugin have been converted to Python 3, the script in Other_Tools are older, and are still using Python 2. This script for instance is version 2.5, and uses Python 2, while the script from the plugin Should is version 3.0, and has been converted to Python 3. We can convert the Other_Tools scripts to Python 3, but that's in fact already been done for the plugin. If they should be converted, we could probably just copy the plugin scripts to the Other_Tools folder, and rename .py to .pyw.

If these scripts can stay at Python 2, yukaritamura is correct, and this fix will make the script work.

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.

2 participants