Skip to content

Latest commit

 

History

History
32 lines (22 loc) · 1.01 KB

README.md

File metadata and controls

32 lines (22 loc) · 1.01 KB

StaphDialog

A minimal glue library to show GUI prompts that interacts with users using different backends

Usage

import staphdialog

staphdialog.api.info("My Title", "My info")
staphdialog.api.question("My Title", "My question")
staphdialog.api.text("My Title", "My prompt")
staphdialog.api.radio("My Title", "My prompt", ("a", "bunch", "of", "options"))

For a return value of None, it means user cancelled the interaction, the interaction timed out, or the user did not make a choice.

Dependencies

Currently these backends are supported:

  1. kdialog
  2. zenity
  3. tk
  4. dialog

During import, the first one from the list that looks available to use would be imported and aliased as staphdialog.api.

For this reason, it shall provide a pretty decent appearance on most linux and other desktop OSes.

These processes would be spawned and executed, and results returned back.

Want to help?

PRs are very welcomed. I also hope that this could be potentially adapted for other backends to interact with user.