object Python
- Companion
- class
Value members
Concrete methods
- Value Params
- interpreter
optional path to a Python interpreter executable, which defaults to
Some("python3")
if not provided
- Returns
an instance of ai.kien.python.Python which provides the necessary configuration properties for embedding a specific Python interpreter
- Example
val python = Python() python.scalapyProperties.get.foreach { case (k, v) => System.setProperty(k, v) } import me.shadaj.scalapy.py println(py.eval("'Hello from Python!'"))
- Value Params
- interpreter
path to a Python interpreter executable
- Returns
an instance of ai.kien.python.Python which provides the necessary configuration properties for embedding a specific Python interpreter
- Example
val python = Python("/usr/local/bin/python3") python.scalapyProperties.get.foreach { case (k, v) => System.setProperty(k, v) } import me.shadaj.scalapy.py println(py.eval("'Hello from Python!'"))