Skip to main content

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

  1. Open Window -> Edit Mode.
  2. Use the detached Tools window to choose an object type.
  3. Click the card to create an object (auto-returns to Select).
  4. Double-click an object to edit properties.
  5. Use File -> Save to persist to .pycard/cards.json.
  6. 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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

lions_pycard-0.1.0.tar.gz (12.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

lions_pycard-0.1.0-py3-none-any.whl (12.5 kB view details)

Uploaded Python 3

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

Hashes for lions_pycard-0.1.0.tar.gz
Algorithm Hash digest
SHA256 9caa63cc2c44fe5844d1b5193fd9e580ab1e18e7af64a96092f37204f3fc8605
MD5 a2c2082db5e61528209f47e8b2ab2f5d
BLAKE2b-256 24930639345289e38889fef8c99a925ab2cac140563d2c9328a33e35c312beca

See more details on using hashes here.

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

Hashes for lions_pycard-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 74ee90d01e6b39306909808df7a3111409bd7a981cfe321708db933811341450
MD5 c9a3b01143c5b06160d47638f23d5ac9
BLAKE2b-256 714d06bbae0ff42a087ff41ac9afbd54e8817bce11444614cf8efcc044987da4

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page