Skip to main content

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


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 details)

Uploaded Source

Built Distribution

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

tkinterAsync-1.0.0-py3-none-any.whl (5.7 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: tkinterAsync-1.0.0.tar.gz
  • Upload date:
  • Size: 6.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.6.1 pkginfo/1.5.0.1 requests/2.24.0 requests-toolbelt/0.9.1 tqdm/4.47.0 CPython/3.8.3

File hashes

Hashes for tkinterAsync-1.0.0.tar.gz
Algorithm Hash digest
SHA256 cbbd13b0e52a31ad8da0d124aa8f98bc382eddd476e6c2c90ba54a21a1fdd007
MD5 5029d2fa95e8ae063d5001b6c4a3bbd1
BLAKE2b-256 c84cfb051d82c18b0b464e64cd998f9a22ecc63058507f437bbf2258aeda1fe2

See more details on using hashes here.

File details

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

File metadata

  • Download URL: tkinterAsync-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 5.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.6.1 pkginfo/1.5.0.1 requests/2.24.0 requests-toolbelt/0.9.1 tqdm/4.47.0 CPython/3.8.3

File hashes

Hashes for tkinterAsync-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 139e89824090a9fab286df96962bf682acd1f54bfa9716d3b5ff95ab54e7fe91
MD5 ac6953ce93794697bae7d9ad236cc853
BLAKE2b-256 6aff5a5d4e36b0ae641d377e3949471b40636991e9a177bba9dd59d9d2dc152a

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