Skip to main content

Repple

Quick and dirty opinionated fdisk-style REPLs

  • Whitespace-separated command and arguments
  • Except unary string functions
  • Selector prompt
from repple import Repple
r = Repple()
r['a'] = (lambda x: print(x+1), "Adds one to first argument and prints it")
r['A'] = lambda x: print(x+2)
def variadic_fn(*args):
  print(*[a+1 for a in args])

r.main()
Command: h
        q               Exits the program
        h               Show this help
        a <x>           Adds one to first argument and prints it
        A <x>
        b <args>
Command: a 1
2
Command: A 1
3
Command: b 1 2
2 3

Selector

from repple import Repple
r = Repple()
r['a'] = lambda: print(Repple.selector(['a','b','c']))
r.main()
Command: a
        1: a
        2: b
        3: c
Select your items: 1 3
['a', 'c']

Unary string function

from repple import Repple
r = Repple()
r.add_string_func('p', lambda x: print(x))
r.main()
Command: p Hello world!
Hello world!

Metadata

Release files for repple 0.3.4

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for repple 0.3.4
File Size Uploaded
repple-0.3.4.tar.gz 3.5 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for repple 0.3.4
File Interpreter ABI Platform
repple-0.3.4-py3-none-any.whl Python 3 none any Details

Total release size: 7.2 kB

Release files / repple-0.3.4.tar.gz

Download URL repple-0.3.4.tar.gz
Size 3.5 kB
Tags Source
SHA-256 checksum
How to use checksums
f669100cf374c7939ae68804cbce684ba1f5ee907fe8eae14e64c780f7c7941b
BLAKE2b-256 checksum
How to use checksums
610d3754a4d94bc33131413ba5cf335f1f4e08e7553e12202565b4ba080fc6c8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.10.7

Release files / repple-0.3.4-py3-none-any.whl

Download URL repple-0.3.4-py3-none-any.whl
Size 3.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
e3c060c363be99fc5438e257b3601bba15bd135a69009db9a7bfc594efce0c12
BLAKE2b-256 checksum
How to use checksums
2d7251f0eaa84576d16980185e2e0ff5c216220885f8a2b11a64d3f2b13efd1d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.10.7

Release history Release notifications | RSS feed

This release

0.3.4 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page