Skip to main content

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.

Install

pip install pyscheme

Using git to install latest version

pip install git+https://github.com/dbian/pyscheme.git

Implemented Features

  • Lexical scope let,let*. begin, if, lambda, define... etc.
  • Full featured Macro system, which means you can use _ and ... in pattern matching rules.
  • easy template interpolation support aka.: "`", "," and ",@"
  • Use put to extend scheme language easily with power python ecosystem.
  • Single line comment, start with ;
  • REPL, with clojure like *1 *2 *3 result cache support
  • More to discover...

Usage

import pyscheme
env = pyscheme.new_env()
assert pyscheme.run("(define bb (lambda (aa) (+ aa 2))) (bb 5)", env) == 7

def str_format_func(f, *args):
    return f % args
pyscheme.put("format", str_format_func)
pyscheme.put("variable", 123)

Future plans

  • macros system add hygienic variable support
  • more standard functions
  • call/cc
  • module system
  • more

Project details


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.

Built Distribution

pyscheme-0.0.4-py3-none-any.whl (7.3 kB view details)

Uploaded Python 3

File details

Details for the file pyscheme-0.0.4-py3-none-any.whl.

File metadata

  • Download URL: pyscheme-0.0.4-py3-none-any.whl
  • Upload date:
  • Size: 7.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.0 CPython/3.11.6

File hashes

Hashes for pyscheme-0.0.4-py3-none-any.whl
Algorithm Hash digest
SHA256 a114ec3f423215b7d957faa484db538e8422a761b1d59882d6a4c6ea52acbc7f
MD5 975559ffa8e1ab747e64b92f4a733ab6
BLAKE2b-256 3ebf0771cee7f3f26467bfb96bbf133a3d08cdc625856c334fe49205f01932f8

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page