Is there a way to call Python script inside of a Kotlin project?

爱⌒轻易说出口 提交于 2021-02-08 10:58:27

问题


I have been programming a Python desktop app in Python 3.7 with tkinter. Many of my friends have said using it as an mobile application will get more users. I have been working with sklearn and different modules in Python to run along side the GUI. Is it possible to call that script in Kotlin?


回答1:


Yes it is possible. Python has REPL, it's own interactive interpreter and as it turns out Kotlin has a REPL as well. You'll still have to do research and find the interfaces to use with your front end.

NOTE: In Intellij Idea Kotlin has REPL. I'm afraid I don't know if it's the same with other IDEs.

If it's only for Android, you can use QPython. QPython is a script engine which runs Python programs on android devices.



来源:https://stackoverflow.com/questions/54021771/is-there-a-way-to-call-python-script-inside-of-a-kotlin-project

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!