Open aont opened 4 years ago
Thank you so much @aont. I can confirm this works with Python 3.
One suggestion: maybe switch the first line to
#!/usr/bin/env python
so that the script is more robust.
MacOS 12.3 deprecated Python2. So pdf.py
is not longer usable without this PR.
but __str__
is corresponding to __bytes__
not get_bytes
。
2nd on __bytes__
too. (and use bytes(x)
instead of x.get_bytes()
. BTW, it would also be useful not to include unnecessary white-space changes ( in line 140-150-ish) - this makes reviewing easier.
python 2 has been deprecated for a while. It is probably simply to get rid of all the conditionals about py2 too.
@lzlarryli thanks for the reply.
!/usr/bin/env python
This may work on MacOS12.3 as you say, but on some of Linux distros not.
It's because they do not provide python
but python3
. ( maybe to discern from python2
. )
In addition, on Windows, python3.exe
is not provided but python.exe
.
Do you have any proposal?
@wizardforcel
thanks for the reply.
You mean __bytes__
is appropriate rather than get_bytes
?
@HinTak thanks for the reply.
it would also be useful not to include unnecessary white-space changes ( in line 140-150-ish) - this makes reviewing easier.
Oh, you are right. but I already removed fork repo, I hesitate to create new one... (In addition, the maintainer is not watching PRs...?)