org.jetbrains.kotlinx.jupyter.repl.CellExecutor.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of kotlin-jupyter-kernel Show documentation
Show all versions of kotlin-jupyter-kernel Show documentation
Kotlin Jupyter kernel published as artifact
package org.jetbrains.kotlinx.jupyter.repl
import org.jetbrains.kotlinx.jupyter.DisplayHandler
import org.jetbrains.kotlinx.jupyter.api.Code
import org.jetbrains.kotlinx.jupyter.api.libraries.ExecutionHost
/**
* Executes notebook cell code.
* Performs code preprocessing (magics parsing) and snippet class postprocessing (variable converters and annotation handlers)
*/
interface CellExecutor : ExecutionHost {
fun execute(
code: Code,
displayHandler: DisplayHandler? = null,
processVariables: Boolean = true,
processAnnotations: Boolean = true,
processMagics: Boolean = true,
invokeAfterCallbacks: Boolean = true,
currentCellId: Int = -1,
callback: ExecutionStartedCallback? = null
): InternalEvalResult
}
typealias ExecutionStartedCallback = (internalId: Int, code: Code) -> Unit
© 2015 - 2025 Weber Informatics LLC | Privacy Policy