Skip to main content

import lang.[python,lisp,...]

Project description


author:

  • Marco Heisig title: 'A library for cross-language interoperability.'

The lang module/system/library can be loaded from multiple programming languages to seamlessly integrate all the other supported ones. The currently supported languages are Python and Lisp.

Installation

Requires libsbcl in your library path if you want to load Lisp into Python.

Requires libpython3.11 or later in your library path if you want to load Python into Lisp.

Showcases

(in-package #:cl-user)
(sb-ext:add-package-local-nickname '#:python '#:lang.python)

(python:list #(1 2.0 #c(3 4) "5 6"))
 => [1, 2.0, #C(3 4) "5 6"]

(python:tuple (python:map #'class-of *))
 => (<class 'lang.common-lisp.fixnum'>,
     <class 'lang.common-lisp.single-float'>,
     <class 'lang.common-lisp.complex'>,
     <class 'lang.sb-kernel.simple-character-string'>)

(python:getitem (python:dir 42) (python:slice 5))
 => ['__class__', '__bool__', '__and__', '__add__', '__abs__']

(python:isinstance (python:getitem (python:dir 42) 0) (find-class 'python:str))
 => True

(typep (python:getitem (python:dir 42) 0) 'python:str)
 => t

Project details


Release history Release notifications | RSS feed

This version

0.1

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

lang-0.1.tar.gz (3.0 kB view details)

Uploaded Source

Built Distribution

lang-0.1-py3-none-any.whl (3.1 kB view details)

Uploaded Python 3

File details

Details for the file lang-0.1.tar.gz.

File metadata

  • Download URL: lang-0.1.tar.gz
  • Upload date:
  • Size: 3.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.0 CPython/3.11.0rc1

File hashes

Hashes for lang-0.1.tar.gz
Algorithm Hash digest
SHA256 06daddd4d0dc9cd05b25f15662560d3183a7fe51506930f5babe073fbbf75f0d
MD5 04470c29018e97e6ebe5dd7c7831c54a
BLAKE2b-256 d46f2ada450c78aed64b5d455befbdd5a899ffaa0d8d2594c87742e86925560e

See more details on using hashes here.

File details

Details for the file lang-0.1-py3-none-any.whl.

File metadata

  • Download URL: lang-0.1-py3-none-any.whl
  • Upload date:
  • Size: 3.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.0 CPython/3.11.0rc1

File hashes

Hashes for lang-0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 24647c80a85f2a2e7303b5d5ffa3f1c4631fac21dd42a20d6bc9f4abfd92d3a0
MD5 dba7f889fd39ef4924afaf6f37965799
BLAKE2b-256 c384f4f98574eb3eccdbf2615e06a2e51959ee5b3993deba88ea1e07c6424ef1

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