Skip to main content

Create a splash screen for a software, typically developed in custom tkinter

Project description

pip install splashscreen_ctk


Create a splash screen for a software, typically developed in custom tkinter.

--------------------------------------------------
import splashscreen_ctk as splash
import threading, time


def do_jobs():
set_splash_text(f"Doing something...")
start_thread(do_something, "Hello,", "world")

set_splash_text(f"Doing something else...")
start_thread(do_something_else, "Goodbye,", "world!")

set_splash_text("Loading complete!")
test.close_splashscreen = True


def start_thread(target, *args):
# Use threading for complicated actions that would freeze tkinter / cause not responding warning.
loading_thread = threading.Thread(target=target, args=[arg for arg in args])
loading_thread.start()
while loading_thread.is_alive():
time.sleep(1)


def do_something(text1, text2):
print(text1, text2)
time.sleep(5)


def do_something_else(text1, text2):
print(text1, text2)
time.sleep(5)


def set_splash_text(text):
# Note changes to splash text will not work if called from any other thread than main thread.
test.splash_status_text.set(text)
test.update()


test = splash.SplashScreen("path_to_image.jpg", # Can be any image file type that works with PILLOW / CTkImage, or bytes with io.BytesIO
initial_status_value="Loading...",
app_info="Your Application v1.0.0",
app_info_font=("helvetica", 36),
app_info_text_color="#333333",
status_font=("helvetica", 18),
status_text_colour="#222222")

test.after(5, do_jobs)
test.mainloop()
--------------------------------------------------

OS independant
Python 3

install requires:
- customtkinter 0.3, url: https://pypi.org/project/customtkinter/0.3/, url: https://customtkinter.tomschimansky.com/

--------------------------------------------------

GitHub url: https://github.com/DevDolphin7/SplashScreen
PyPI url: https://pypi.org/project/splashscreen_ctk/
Get in contact: DevDolphin7@outlook.com

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

splashscreen_ctk-0.2.2.tar.gz (16.8 kB view details)

Uploaded Source

Built Distribution

splashscreen_ctk-0.2.2-py3-none-any.whl (16.6 kB view details)

Uploaded Python 3

File details

Details for the file splashscreen_ctk-0.2.2.tar.gz.

File metadata

  • Download URL: splashscreen_ctk-0.2.2.tar.gz
  • Upload date:
  • Size: 16.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.10.6

File hashes

Hashes for splashscreen_ctk-0.2.2.tar.gz
Algorithm Hash digest
SHA256 7f93bb69fbc2905f7587d96d92fa7d156a0706c3a087243e02fa8f871867aa19
MD5 2f1042d2af3d18e1eb6c7370c76f571f
BLAKE2b-256 bfc2ef3be1e80091a1a85d0dd9c8392c626e768d05f5a63fdbd04d71cc79f4f0

See more details on using hashes here.

File details

Details for the file splashscreen_ctk-0.2.2-py3-none-any.whl.

File metadata

File hashes

Hashes for splashscreen_ctk-0.2.2-py3-none-any.whl
Algorithm Hash digest
SHA256 727a76657ff22cbd88bcddb451b683673e8d56299d714149e77600d345227435
MD5 143bc7882e1be522fe62dd9f70ee952f
BLAKE2b-256 b71512d712606beff920d8f557c0b333dbcf78919172660bed036a5cd226d09f

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page