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.

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
  • clojure pipeline operator support
  • 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

If you're not sure about the file name format, learn more about wheel file names.

pyscheme-0.0.2-py3-none-any.whl (3.4 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: pyscheme-0.0.2-py3-none-any.whl
  • Upload date:
  • Size: 3.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.12.0

File hashes

Hashes for pyscheme-0.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 18d0f7f6f9fec45db1734391a06e339ffd209c8f886ffbde38feb3ac10daa383
MD5 5b5a275c0957275a5541836c466589c8
BLAKE2b-256 1519f751195f0012677f8660d248c4d873dd8432c817491a915a28c5959af7d2

See more details on using hashes here.

Supported by

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