Minimal r7rs scheme python library with a repl. Made by gpt, maintained by a human.
Project description
Minimal r7rs scheme python library with a repl. Made by gpt, maintained by human.
Warning
Under heavy development, use it at your own risk.
Install
pip install pyscheme
You may try latest features by using git to install
pip install git+https://github.com/dbian/pyscheme.git
Implemented Features
- lexical scope
let
begin
,if
,lambda
,define
... etc.- REPL, with clojure like
*1
*2
*3
result cache support - install_func to extend scheme language, you can use it to install global variables too.
- single line comment, start with
;
- more
Usage
import pyscheme.scheme as sc
env = sc.new_env()
assert sc.run("(define bb (lambda (aa) (+ aa 2))) (bb 5)", env) == 7
def str_format_func(f, *args):
return f % args
sc.install_func("format", str_format_func)
Todo
- macros system
- better token parsing
- string support whitespace
(
)
- quote
'
support
- string support whitespace
- clojure pipeline operator support
- module system
- more
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
No source distribution files available for this release.See tutorial on generating distribution archives.