kotlin-jupyter icon indicating copy to clipboard operation
kotlin-jupyter copied to clipboard

Import .kt files

Open KirillKurdyukov opened this issue 2 years ago • 2 comments

Hi! How import .kt files in jupyter notebook? Example: ./Utils.kt and ./notebook.ipynb, how import Utils.kt to notebook.ipynb. import Utils.kt don't work :(

KirillKurdyukov avatar Apr 12 '22 19:04 KirillKurdyukov

Hi! It's not possible, you can only import compiled files (.class files) and libraries. It's the common limitation for Kotlin scripting.

ileasile avatar Apr 13 '22 11:04 ileasile

In theory, it should be possible to import script as text into the cell. Since it is more or less the thing Jupyter interpreter does. But it could be a hell to support. Also a lot of compatibility issues.

altavir avatar Apr 29 '22 12:04 altavir