Run Tkinter module with own code at the same time
Project description
TkinterAsync
Run Tkinter Tcl/Tk Python module with own loop code at the same time.
For more info Github - https://github.com/ZhengLinLei/tkinterAsync Issues Github - Issues
Example code:
import sys
import os.path
sys.path.append(
os.path.abspath(os.path.join(os.path.dirname(__file__), os.path.pardir)))
from src.tkinterAsync import Tkinter
# TKINTER GUI
def gui(root, tk, ttk):
root.title('Title example')
root.geometry('300x300')
root.resizable(0, 0)
button = tk.Button(root, text = 'Alert', padx = 25, cursor = 'hand2', command = lambda : print('Hello World!'))
button.place(relx=0.5, rely=0.5, anchor=tk.CENTER)
# CREATE VARIABLE
root = Tkinter(gui) # PASS THE FUNCTION OR METHOD CLASS
# AFTER RUNNING TKINTER, THE PYTHON MUST RUN THE CODE BELOW AT THE SAME TIME
print('Running this after Tkinter')
for i in range(1000):
print(i)
Zheng Lin Lei Github - 2021
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
tkinterAsync-1.0.0.tar.gz
(6.0 kB
view hashes)
Built Distribution
Close
Hashes for tkinterAsync-1.0.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 139e89824090a9fab286df96962bf682acd1f54bfa9716d3b5ff95ab54e7fe91 |
|
MD5 | ac6953ce93794697bae7d9ad236cc853 |
|
BLAKE2b-256 | 6aff5a5d4e36b0ae641d377e3949471b40636991e9a177bba9dd59d9d2dc152a |