java-random
java-random copied to clipboard
Import javarandom error
import javarandom as jr Traceback (most recent call last): File "
", line 1, in File "/home/.conda/envs/py36/lib/python3.6/site-packages/javarandom.py", line 43 self._seed = (seed ^ 0x5deece66dl) & ((1 << 48) - 1)
Same error here with python3, had to downgrade to python2 to use.
# python3
Python 3.7.3 (default, Apr 24 2020, 18:51:23)
[Clang 11.0.3 (clang-1103.0.32.62)] on yoursystem
Type "help", "copyright", "credits" or "license" for more information.
>>> import javarandom
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/Library/Python/3.7/site-packages/javarandom.py", line 43
self._seed = (seed ^ 0x5deece66dl) & ((1 << 48) - 1)
^
SyntaxError: invalid syntax
>>> exit()
And, here we are, I just started playing with this too, and no P3 support :(
@coolacid @rcliu @Greenwolf Are you able to solve this issue?
Feel free to forward-port to Python 3. It shouldn't be hard. I haven't needed this code for a long time, and it's really only of interest for folks doing historical research or doing reverse-engineering. Like, I wrote this module to help reverse-engineer Minecraft in Java! If you don't need that sort of thing, then please use random
instead.
PR #2 solved this issue 5 years ago. I think the problem is that the packaged version on PyPI is outdated.
@MostAwesomeDude could you push the current version to PyPI please?
In the meantime, anyone experiencing this issue can install this module using:
pip install 'git+https://github.com/MostAwesomeDude/java-random.git'