Embedding a Guile interpreter. More...
Classes | |
class | GuileError |
Raised on Guile-related errors. More... | |
class | Procedure |
Guile procedure. More... | |
Functions | |
def | lookup |
Return the variable bound to a symbol. More... | |
def | define |
Create a top level variable. More... | |
def | load |
Load a file and evaluate its contents in the top-level environment. More... | |
def | eval_string |
Parse a string as Scheme and evaluate the expressions it contains, in order, returning the last expression. More... | |
Embedding a Guile interpreter.
This module allows embedding a Guile interpreter into a Python application. It translates Python objects transparently into Guile objects and vice versa. In order to make a Python function available to Guile code, just bind it to a variable name:
def xorn.guile.define | ( | name, | |
value | |||
) |
Create a top level variable.
If the named variable already exists, just changes its value.
GuileError | if value can't be represented as a Guile object |
def xorn.guile.eval_string | ( | string | ) |
def xorn.guile.load | ( | name | ) |
Load a file and evaluate its contents in the top-level environment.
name must either be a full pathname or be a pathname relative to the current directory. If the Guile variable %load-hook
is defined, the procedure to which it is bound will be called before any code is loaded.