A Python HyperCard-like card editor with scriptable buttons.
Project description
pycard
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.
Features
- 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
Repository
Install
pip install pycard
Run
pycard
or:
python -m pycard
Basic Use
- 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.
Example Button Script
target = find_object_by_name("status")
if target:
set_text(target, "Clicked!")
print("status text:", get_text("status"))
Development
Requirements:
- Python 3.10+
Commands:
python -m pytest -q
python -m py_compile src/pycard/app.py src/pycard/cli.py
License
MIT
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file lions_pycard-0.1.0.tar.gz.
File metadata
- Download URL: lions_pycard-0.1.0.tar.gz
- Upload date:
- Size: 12.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9caa63cc2c44fe5844d1b5193fd9e580ab1e18e7af64a96092f37204f3fc8605
|
|
| MD5 |
a2c2082db5e61528209f47e8b2ab2f5d
|
|
| BLAKE2b-256 |
24930639345289e38889fef8c99a925ab2cac140563d2c9328a33e35c312beca
|
File details
Details for the file lions_pycard-0.1.0-py3-none-any.whl.
File metadata
- Download URL: lions_pycard-0.1.0-py3-none-any.whl
- Upload date:
- Size: 12.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
74ee90d01e6b39306909808df7a3111409bd7a981cfe321708db933811341450
|
|
| MD5 |
c9a3b01143c5b06160d47638f23d5ac9
|
|
| BLAKE2b-256 |
714d06bbae0ff42a087ff41ac9afbd54e8817bce11444614cf8efcc044987da4
|