github.com /ceccopierangiolieugenio/pyTermTk/blob/main/README.md

ceccopierangiolieugenio/pyTermTk: Python Terminal Toolkit

3-3 minutes

Open in github.dev Open in a new github.dev tab

Permalink

Linux Usage Python pyTermTk_version Test Status pypi_version pypi_version

screenshot

Text-based user interface library (TUI) Evolved from the discontinued project pyCuT and inspired by a mix of Qt5,GTK, and tkinter api definition with a touch of personal interpretation

screenshot

Features

  • Basic widgets for TUI development (Button, Label, checkbox, ...)
  • Specialized widgets to improve the usability (Windows, Frames, Tables, ...)
  • QT Like Layout system to help arrange the widgets in the terminal
  • True color support
  • [TBD] Fullsize/Halfsize UTF-8 characters

Limitations

  • Only the key combinations forwarded by the terminal emulator used are detected (ALT,CTRL may not be handled)

Try

screenshot

Tutorial

Be inspired by the tutorial examples

Api Definitions

Don't get bored by the Api Definitions

Install/Upgrade

pyTermTk is available on PyPI

pip3 install --upgrade pyTermTk

Quick Test/Try - no install required

Clone

clone git@github.com:ceccopierangiolieugenio/pyTermTk.git
cd pyTermTk

Run Basic (non ui) input test

python3 tests/test.input.py

Run demo

# Press CTRL-C to exit
# the logs are written to "session.log"
make runDemo
  # or
python3 demo/demo.py -f

# Try gittk
make runGittk

Profiling

cProfile, cProfilev
python3 -m cProfile -o profiler.txt tests/test.ui.004.py

# install cprofilev:
#     pip3 install cprofilev
cprofilev -f profiler.txt
# open http://127.0.0.1:4000
pyroscope

pyroscope can be used as well for profiling

Related Projects

  • honourable mention

    • bpytop - Linux/OSX/FreeBSD resource monitor
      This was the base inspiration for my core library
  • Python

    • urwid - Console user interface library for Python
    • pyTermGUI - A simple yet powerful TUI framework for your Python (3.7+) applications
    • Textual - TUI (Text User Interface) framework for Python inspired by modern web development
    • Rich - Python library for rich text and beautiful formatting in the terminal
    • PyCuT - terminal graphic library loosely based on QT api (my previous failed attempt)
    • pyTooling.TerminalUI - A set of helpers to implement a text user interface (TUI) in a terminal.
  • Non Python

::...
免责声明:
当前网页内容, 由 大妈 ZoomQuiet 使用工具: ScrapBook :: Firefox Extension 人工从互联网中收集并分享;
内容版权归原作者所有;
本人对内容的有效性/合法性不承担任何强制性责任.
若有不妥, 欢迎评注提醒:

或是邮件反馈可也:
askdama[AT]googlegroups.com


订阅 substack 体验古早写作:


点击注册~> 获得 100$ 体验券: DigitalOcean Referral Badge

关注公众号, 持续获得相关各种嗯哼:
zoomquiet


自怼圈/年度番新

DU22.4
关于 ~ DebugUself with DAMA ;-)
粤ICP备18025058号-1
公安备案号: 44049002000656 ...::