lions-pycard is a Python HyperCard-like editor built with tkinter.
It provides a card-style canvas where you can place UI objects (Label, Button, Entry, Text), edit properties, save/load cards as JSON, and attach Python scripts to buttons.
- Visual card editor with select/move/create tools
- Object types:
label,button,entry,text - Property editor (double-click objects in edit mode)
- Per-button Python scripting (
on_click_code) - Script helpers in execution context:
find_object_by_id(...)find_object_by_name(...)find_object_by_text(...)get_text(...)set_text(...)
- Card persistence to
.pycard/cards.json - Window size persistence
pip install lions-pycardpycardor:
python -m pycard- Open
Window -> Edit Mode. - Use the detached
Toolswindow to choose an object type. - Click the card to create an object (auto-returns to
Select). - Double-click an object to edit properties.
- Use
File -> Saveto persist to.pycard/cards.json. - Turn off edit mode to run button scripts.
target = find_object_by_name("status")
if target:
set_text(target, "Clicked!")
print("status text:", get_text("status"))Requirements:
- Python 3.10+
Commands:
python -m pytest -q
python -m py_compile src/pycard/app.py src/pycard/cli.pyMIT