I'm trying to generate random numbers in Python code running on the JVM with PyBee's VOC transpiler. For now, it looks like the Python random
module isn't included, so how can I generate random numbers?
Here's the code I tried to transpile:
from random import randrange
print(randrange(5))
And here's the error when I run the class file in Java:
Exception in thread "main" java.lang.ClassCastException: org.python.java.Module (in module: Unnamed Module) cannot be cast to org.python.Callable (in module: Unnamed Module)
at python.example.module$import(example.py:3)
at python.example.main(example.py)