Hello, I'm new to Kotlin but Java was the first la...
# announcements
a
Hello, I'm new to Kotlin but Java was the first language I learned back in 2010. I was wondering is there any binding for the python interpreter for Kotlin? I'm trying to develop an AI but also want to turn this into an app so that's why I wanted to go for Kotlin for the majority of the development and only develop the AI in python since there exists very nice deep learning frameworks. I tried searching for bindings to Kotlin for python and couldn't find anything... Basically what I'm hoping to find is something like this but for Kotlin: https://cppyy.readthedocs.io/en/latest/ I only need calling Kotlin from Python
c
There are a couple different Java-based Python interpreters you could try. They should work just the same from Kotlin/JVM. Jython supports 2.7 and py4j is 3.4+, and both seem actively supported
c
basically for anything you want if you cannot find something kotiln-specific or don't think quality is up to snuff, you just look for it in Java. Since Kotlin is 99.99% interoperable with Java you should be able to use java stuff without problems.
d
Jython actually compiles python to java byte code, it's pretty decent
a
Ok that's the impression I was getting with Kotlin but wasn't sure how Kotlin used the JVM and if I could just use a Java-based solution. Thank you!
c
Yeah, Kotlin literally just compiles down to normal Java .class files. The JVM doesn’t know any difference between a Java class and a Kotlin class
👍 1