Utility helpers for timing, looping, and simple output formatting.
Project description
SyntaxMod
Utility helpers for quick scripting tasks: looping functions, timed waits, and stopwatch/timer primitives with pause/resume support.
Installation
pip install .
Usage
from syntaxmod import loop, wait, Stopwatch, Timer
loop(3, print, ["hello"])
wait(0.5)
watch = Stopwatch()
# ... do work ...
print(f"Elapsed: {watch.pause():.2f}s")
Timer(2.0, lambda: print("done"))
Timer controls
from syntaxmod import Timer
def callback():
print("Timer fired!")
timer = Timer(5, callback, start=False)
timer.resume() # start counting down
wait(2)
elapsed = timer.pause()
print(elapsed)
timer.resume()
Development
python -m build
pytest
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
syntaxmod-0.1.0.tar.gz
(5.0 kB
view details)
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 syntaxmod-0.1.0.tar.gz.
File metadata
- Download URL: syntaxmod-0.1.0.tar.gz
- Upload date:
- Size: 5.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8a978237c43645193819f2fa787753a23b628073392655e15b4eca2b5d463515
|
|
| MD5 |
ca481c903ade8f100cb289c0f920baa5
|
|
| BLAKE2b-256 |
ab643ca45c992c0cc7592ecd59bb1aa46c9d9ee5eb09bdeec05629e157508f48
|
File details
Details for the file syntaxmod-0.1.0-py3-none-any.whl.
File metadata
- Download URL: syntaxmod-0.1.0-py3-none-any.whl
- Upload date:
- Size: 5.1 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 |
b8d1bc9f1a9140629d91da43e9905ce1f6fa4e595a1fe3a2d154034d3712bee4
|
|
| MD5 |
429421295612f1bb6d1d12cd719dc4f4
|
|
| BLAKE2b-256 |
a651ad079c688cbd26d8eead42161e92026eb50e544252d9ecec92e9599897e9
|