This repository contains source code for PyKal, which is the official bindings library to embed Kal into Python via libkal.
$ pip3 install pykalYou must have libkal.so compiled and installed on your system for PyKal to function. Follow instructions for installation.
Usage Example:
from pykal import Kal
kal = Kal()
result = kal.exec(
"""
var data = $data.
len data -> size.
first data -> f.
last data -> l.
var m = data[(size / 2) as int].
<- [f, m, l].
""",
{
'data': [1, 2, 3, 4, 5]
{
)
print('Return Value:', result, '\n')
for r in result.to_list():
print(r, r.to_number())- Kal - Core Kal Interpreter.
- PyKal - Python Bindings for Embeddable Kal.
- JSKal - JavaScript Bindings for Embeddable Kal.
- Kal Website - Offical Kal Website.