Skip to main content

A Python HyperCard-like card editor with scriptable buttons.

Project description

lions-pycard

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.

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 lions-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.1.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.1-py3-none-any.whl (12.5 kB view details)

Uploaded Python 3

File details

Details for the file lions_pycard-0.1.1.tar.gz.

File metadata

  • Download URL: lions_pycard-0.1.1.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.1.tar.gz
Algorithm Hash digest
SHA256 47e086bb8375af0a98fb6ca90d1b0bb4890f25b288765cf86071e6df0c995094
MD5 cce2fac560cb2113b8de740f1df4cd48
BLAKE2b-256 5cca12dfc0c0f30152ec05b85e4daefaffa7da3f95f0ea41111ea49a5b65977a

See more details on using hashes here.

File details

Details for the file lions_pycard-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: lions_pycard-0.1.1-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.1-py3-none-any.whl
Algorithm Hash digest
SHA256 2e877a78d03faa1fa220315a177802762b06f2d180a28ad5b1fce99f4a60aeb0
MD5 0d1660bc30a8ede4ea6d6f3d38540731
BLAKE2b-256 40d322ea999aeb225c58657677cfd0594d0d67716d5fb4ed56d9d5e5ed07755c

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