mixin

PySession

mixin PySession

Mixin for types that implement a python session.

methods init

If the session has not been initialized yet, invoke the callback with this session to allow it to do one-time setup

eval

Evaluate the expression and return the result

define

Define a variable in local scope, and return this

kill

Kill the session - it can no longer be used again

close

Close the session, and return this

exec

Execute the given code block, and return this

timeout

Set the timeout for evaluating python expressions and return this

close virtual This close()

Close the session, and return this

define abstract This define(Str name, Obj? val)

Define a variable in local scope, and return this

eval abstract Obj? eval(Str expr)

Evaluate the expression and return the result.

exec abstract This exec(Str code)

Execute the given code block, and return this

init abstract This init(|PySession| fn)

If the session has not been initialized yet, invoke the callback with this session to allow it to do one-time setup.

kill virtual This kill()

Kill the session - it can no longer be used again

timeout abstract This timeout(Duration? dur)

Set the timeout for evaluating python expressions and return this

Haxall 4.0.5 ∙ 24-Feb-2026 14:33 EST