mirror of
https://github.com/Faraphel/Atlas-Install.git
synced 2025-07-03 19:28:25 +02:00
12 lines
No EOL
424 B
Python
12 lines
No EOL
424 B
Python
import json
|
|
|
|
|
|
def change_option(self, option, value, restart=False):
|
|
if type(value) in [str, int, bool]: self.option[option] = value
|
|
else: self.option[option] = value.get()
|
|
with open("./option.json", "w", encoding="utf-8") as f: json.dump(self.option, f, ensure_ascii=False)
|
|
if restart: self.restart()
|
|
|
|
|
|
def load_option(self):
|
|
with open("./option.json", encoding="utf-8") as f: self.option = json.load(f) |