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.3-py3-none-any.whl (4.2 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for pyscheme-0.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 b4e789209b795b60545581d8a4bf521e7dd52de74c9357a6fe43c1f6ca2c4463
MD5 6c9f58c982e3cc684364dbceafc64f3b
BLAKE2b-256 a1300b508e8e6b30d71ebe62d532caeaab83e7bba044cdaeaa7cc113becbe51c

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