Python

object Python
Companion
class
class Object
trait Matchable
class Any

Value members

Concrete methods

def apply(interpreter: Option[String]): Python
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!'"))
def apply(interpreter: String): 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!'"))