Skip to main content

A web-based curses library replacement

Project description

webcurses

A drop-in replacement for the Python curses library that renders to a web browser.

Usage

import webcurses
from webcurses import wrapper

def main(stdscr):
    stdscr.clear()
    stdscr.addstr(0, 0, "Hello, Webcurses!")
    stdscr.refresh()
    stdscr.getch()

wrapper(main)

Running

By default, webcurses starts a web server on port 8080.

  1. Run your script:
    python your_script.py
    
  2. Open your browser to http://localhost:8080.

Configuration

To change the port, set the WEBCURSES_PORT environment variable:

export WEBCURSES_PORT=9090
python your_script.py

Then navigate to http://localhost:9090.

Project details


Download files

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

Source Distribution

webcurses-0.1.0.tar.gz (3.6 kB view details)

Uploaded Source

Built Distribution

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

webcurses-0.1.0-py3-none-any.whl (3.8 kB view details)

Uploaded Python 3

File details

Details for the file webcurses-0.1.0.tar.gz.

File metadata

  • Download URL: webcurses-0.1.0.tar.gz
  • Upload date:
  • Size: 3.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.9.6

File hashes

Hashes for webcurses-0.1.0.tar.gz
Algorithm Hash digest
SHA256 1a7ea559ca2a8672bc26c41ee4f1c5e4829de95f4acacc8838e1cef615ee7a68
MD5 a5a3f3a511917a27dae2f298e607e606
BLAKE2b-256 f979a20157aa834820277a4326625e3f6b941d6c6b33cd7342d9e7b8756ccb6b

See more details on using hashes here.

File details

Details for the file webcurses-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: webcurses-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 3.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.9.6

File hashes

Hashes for webcurses-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 f60c1cc5e1d7dee6b80b37b55ded149c229ecfaea928c631ce4f1c60441bb422
MD5 dcd0b6578d75a3e7c42cf16101a6a337
BLAKE2b-256 5b51d6a8ce2461160cede16e96a4399275cb99a608c6965d523d89a1514a585b

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