Skip to content

A console for the terminal, written in rust.

License

Notifications You must be signed in to change notification settings

1borgy/exoshell

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

exoshell

A console for the terminal, written in rust.

Introduction

Exoshell uses PyO3 and Maturin to build a python binary wheel.

Example

Using exoshell from python:

from exoshell import Console, Action
import colored


console = Console("exoshell", ("exoshell", "demo"))
console.start()

running = True
while running:
    match console.update(1):
        case Action.Writeline(line):
            console.print(
                colored.stylize(f">> {line}", colored.Fore.YELLOW, colored.Style.BOLD)
            )
            console.print("\n")
            console.print(f"echo: {line!r}")
            console.print("\n")

        case Action.Write(c):
            console.print(f"{c}")

        case Action.Quit():
            running = False

        case None:
            ...

console.stop()

About

A console for the terminal, written in rust.

Resources

License

Stars

Watchers

Forks

Packages

No packages published