Skip to main content

A framework that exposes a simple set of APIs enabling multi-process integration with the curses screen painting library

Project description

mpcurses is a framework that exposes a simple set of APIs enabling multi-process integration with the curses screen painting library.

With the mpcurses APIs, the complexities of setting up multi-processing within a curses environment are abstracted away. The only requirement is that the target method needs to implement logging.

How it works

The method you wish to execute concurrently is decorated with the queue handler decorator. The queue handler decorator creates a new log handler that will write all logged messages within the decorated method to a thread-safe queue. The main process creates the thread-safe message queue and handles the spawning of the desired number of concurrent processes, each process will be passed the reference to the message queue upon startup. As the process executes it will send all log messages to the message queue. The main process will then read messages from the message queue as they come in and update the curses screen accordingly.

The layout of the curses screen is defined as a dictionary and can leverage builtin constructs for capturing messages, incrementing counters, and processing side effects such as changing text colors when certain messages appear. The result is a screen that is being updated dynamically from one or more concurrent processes running in the background.

For samples checkout our home page: https://github.com/soda480/mpcurses

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

mpcurses-0.0.3.tar.gz (8.1 kB view details)

Uploaded Source

Built Distribution

mpcurses-0.0.3-py3-none-any.whl (9.9 kB view details)

Uploaded Python 3

File details

Details for the file mpcurses-0.0.3.tar.gz.

File metadata

  • Download URL: mpcurses-0.0.3.tar.gz
  • Upload date:
  • Size: 8.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/39.0.1 requests-toolbelt/0.9.1 tqdm/4.46.0 CPython/3.6.5

File hashes

Hashes for mpcurses-0.0.3.tar.gz
Algorithm Hash digest
SHA256 805e5acf2594b61f5b6e04ccb119883dc2963674f8fb784c2b91ffaf4448ead8
MD5 18f706fb05d649f07938b25cc41db50a
BLAKE2b-256 6cc78f59b90c26c33575de6e788b1237d32806cea1186f5e713103d9067a66a3

See more details on using hashes here.

Provenance

File details

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

File metadata

  • Download URL: mpcurses-0.0.3-py3-none-any.whl
  • Upload date:
  • Size: 9.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/39.0.1 requests-toolbelt/0.9.1 tqdm/4.46.0 CPython/3.6.5

File hashes

Hashes for mpcurses-0.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 859f444b7ba9d304ff4c87486e8c1183b2c7194310eda66d09d2cee42e930667
MD5 6331a94aa980ad3736e32f9e0f6e73dd
BLAKE2b-256 1d8a54ba8287c5ee305e2e0b8f89f438c53f4cf92d670fdfe60950682a3490c9

See more details on using hashes here.

Provenance

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