Killable, non-blocking threads for tkinter
Tested against Windows / Python 3.11 / Anaconda
Made for tkinter, but can be used without it too!
from tkinter import *
from tkinter import messagebox
from tkkillablethreads import ExecuteAsThreadedTask
import time
def sleepprinter(*args, **kwargs):
print(args, kwargs)
for q in range(7):
print("sleeping")
time.sleep(1)
messagebox.showinfo("Thread Ready", f"Results Ready - check: c.results ")
return "bab"
top = Tk()
top.geometry("100x400")
c = ExecuteAsThreadedTask(fu=sleepprinter, args=("baba", "bbu"), kwargs={"oi": "badxx"})
def threadCallBack():
c()
messagebox.showinfo("Started Thread", str(c))
def threadCallBack2():
c.killthread()
messagebox.showinfo("Killed Thread", str(c))
B = Button(top, text="Start Thread", command=threadCallBack)
B.pack()
BCancel = Button(top, text="Cancel Thread", command=threadCallBack2)
BCancel.pack()
top.mainloop()
Metadata
Release files for tkkillablethreads 0.10
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| tkkillablethreads-0.10.tar.gz | 3.9 kB | Without provenance | Details for tkkillablethreads-0.10.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| tkkillablethreads-0.10-py3-none-any.whl | Python 3 | none | any | Details for tkkillablethreads-0.10-py3-none-any.whl |
Total release size: 8.6 kB
Release files / tkkillablethreads-0.10.tar.gz
| Download URL | tkkillablethreads-0.10.tar.gz |
|---|---|
| Size | 3.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
833f11c1c55a18be67fd465c016352adbeba5d962fb57f31b89a5a0c3b8d6eea
|
|
BLAKE2b-256 checksum How to use checksums |
2b17f63392e4f1b4adbfe5f794072473762c0e965c7ffb12152bad7244a68e82
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.11.7
|
Release files / tkkillablethreads-0.10-py3-none-any.whl
| Download URL | tkkillablethreads-0.10-py3-none-any.whl |
|---|---|
| Size | 4.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
44a4ed430e02e8871ffdae81c5bf85dc780a3ab54b2325c1efc53d6ca2dfc3d8
|
|
BLAKE2b-256 checksum How to use checksums |
4d53e426bec1ceb2e6c0f84ce0db108cce26341080c8ab9070adae53b0188821
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.11.7
|
Security for tkkillablethreads 0.10
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.