Skip to main content

Tiny offline helper to copy stored code snippets to the clipboard.

Project description

pymudata

A tiny, offline helper that copies stored code snippets to your clipboard.

Internet is only needed once, to install. After that everything is bundled inside the package and works completely offline. Nothing is written to your working directory.

Install

pip install pymudata

Use

import pymudata

pymudata.copy(9)      # copy snippet 9 to the clipboard, then Ctrl+V
pymudata.copy(10)     # copy snippet 10
pymudata.show(3)      # just print snippet 3 (no clipboard)
pymudata.list()       # show available snippet numbers
code = pymudata.get(5)  # return snippet 5 as a string, no output

Numbering: 1-9 map to snippets 1-9, 10-12 map to snippets 10-12.

Notes

  • Works in plain Python, the REPL, and a local Jupyter notebook.
  • The clipboard backend is pure standard library (Win32 via ctypes, clip/pbcopy/xclip/wl-copy, or tkinter) - no extra dependencies.
  • If the clipboard cannot be reached (for example a remote kernel), the snippet is printed instead so you can copy it manually. Indentation is preserved exactly, so pasted code runs as-is.
  • Set pymudata.QUIET = True to silence the confirmation message.
import pymudata
pymudata.QUIET = True
pymudata.copy(9)

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

pymudata-1.0.0.tar.gz (10.9 kB view details)

Uploaded Source

Built Distribution

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

pymudata-1.0.0-py3-none-any.whl (13.8 kB view details)

Uploaded Python 3

File details

Details for the file pymudata-1.0.0.tar.gz.

File metadata

  • Download URL: pymudata-1.0.0.tar.gz
  • Upload date:
  • Size: 10.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.5

File hashes

Hashes for pymudata-1.0.0.tar.gz
Algorithm Hash digest
SHA256 568f92c40b4f44bc61d060b54c073ebecad4532b623fa5ce0427de917d5254e5
MD5 5495eefecf97797d5036f52a7c0d83fa
BLAKE2b-256 896f5ddefed1534cbac9b510fe16e1da4a3eff0ead07ce2e19053ab43b302732

See more details on using hashes here.

File details

Details for the file pymudata-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: pymudata-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 13.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.5

File hashes

Hashes for pymudata-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 905b82083dae5ee0b89d18977a3355fa6a312484cad49db449305bc0631a4b4a
MD5 5a87d151e18508db2bd72291eb6dafcc
BLAKE2b-256 6a80c2b0e0e073dc3a0a6cc664aad1ab7781cb7b974db326edaac0461d182c9a

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