- DISCLAIMER *Hey there before anyone says this question already exists i have checked they either dont relate to what im trying to do or i dont understand them. for instance, i tried a splash screen Tkinter Show splash screen and hide main screen until __init__ has finished but it still doesn't launch until the external script has finished importing.
ok so i have a tkinter application which uses a backend function from an external script. This script is working with large datasets and so it takes a good 15-20 seconds to compute although after the initial loading there is no delay.
The problem is that when i import this function to my tkinter GUI script it takes a while to launch as it is loading the module ofcourse.
I was wondering if there was either a way to launch my GUI first and then load the module while the application is running or lauch a loading screen while the module is importing.
any useful links will do, i have tried messing about with constructors in the external script but in that script i have a bunch of code outside any functions as these are required by all the functions in that script.
Thanks in advance for any advice.
Code:
from Content import print_similar_animes # functions from external script
from Content import get_id_from_partial_name
#These functions are within a class and are only
#called when a button is clicked.
def GetPartial(self):
partial=self.NameEntry.get()
get_id_from_partial_name(partial).
def Rec(self):
user_anime=self.NameEntry2.get()
print_similar_animes(user_anime)