Open
Conversation
antdking
reviewed
May 7, 2024
Member
antdking
left a comment
There was a problem hiding this comment.
Thanks. So you know, I won't be testing these changes, but the changes shouldn't result in a behaviour change.
| # limitations under the License. | ||
| # | ||
|
|
||
| from __future__ import print_function |
Member
There was a problem hiding this comment.
This can be left in, it's fine in py3.
| import sys | ||
| import hashlib | ||
| import math | ||
|
|
| d = binascii.hexlify(image_data[-1024:]) | ||
| return d.endswith(lg_magic) or d.startswith(lg_magic) | ||
| print(type(d)) | ||
| print(lg_magic.encode("ASCII"), type(lg_magic.encode("ASCII"))) |
Member
There was a problem hiding this comment.
Instead of this change, lg_magic can be changed to be a byte string on line 38 (b"41....").
It's other uses will accept it
| i = num_pages - 1 | ||
| f_image.seek(0, 0) | ||
| while i >= 0: | ||
| print("page size", page_size, type(page_size)) |
Member
There was a problem hiding this comment.
This is likely going to be very noisy, so best to remove
This file contains hidden or 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
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.
Hello @antdking, thank you for this software, it is still useful today!
But, as Python 2 has been deprecated for some time now, I updated it to Python3, I hope that it could help others.