Kotlin / kotlin-jupyter

Kotlin kernel for Jupyter/IPython
Apache License 2.0
1.09k stars 106 forks source link

Import .kt files #361

Open KirillKurdyukov opened 2 years ago

KirillKurdyukov commented 2 years ago

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 :(

ileasile commented 2 years ago

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

altavir commented 2 years ago

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.