Dec-12-2022, 04:52 AM
I've got a singleton class I'm using that works pretty well but I have several other classes (in different .py files) so I have to create it in every one (Hence the singletopn). Problem is that the prefs class loads from disk and since I have several modules using it I end up loading the same things many times.
Is there a way I can declare just once and use that in imported classes or some way for me to check if the new prefs class is the first instance so I can only load at that time? Or is there something else I can use that would work better?
I have about 1 month of python experience so I'm quite the beginner.
Thanks
Is there a way I can declare just once and use that in imported classes or some way for me to check if the new prefs class is the first instance so I can only load at that time? Or is there something else I can use that would work better?
I have about 1 month of python experience so I'm quite the beginner.
Thanks