mirror of
https://github.com/Faraphel/Atlas-Install.git
synced 2025-07-02 02:38:30 +02:00
use import instead of using sys.modules to avoid a useless sys import
This commit is contained in:
parent
7d7df10217
commit
222886e009
3 changed files with 3 additions and 10 deletions
4
main.pyw
4
main.pyw
|
@ -1,12 +1,10 @@
|
|||
import sys
|
||||
|
||||
from source.gui import install
|
||||
from source.option import Option
|
||||
from source.translation import load_language
|
||||
|
||||
|
||||
# this allows every variable to be accessible from other files, useful for the plugins
|
||||
self = sys.modules[__name__]
|
||||
self = __import__(__name__)
|
||||
|
||||
options = Option.from_file("./option.json")
|
||||
translater = load_language(options["language"])
|
||||
|
|
|
@ -1,9 +1,5 @@
|
|||
import tkinter
|
||||
import sys
|
||||
|
||||
|
||||
# get the main window from the main module
|
||||
window = sys.modules["__main__"].window
|
||||
from __main__ import window
|
||||
|
||||
# get the install button from the main window
|
||||
window.button_install.config(text="installation plugins")
|
||||
|
|
|
@ -1,9 +1,8 @@
|
|||
import json
|
||||
import sys
|
||||
from pathlib import Path
|
||||
|
||||
|
||||
self = sys.modules[__name__]
|
||||
self = __import__(__name__)
|
||||
self._language_data = {}
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue