diff --git a/Calc3D.py b/Calc3D.py index 21b5816..5b9ab25 100644 --- a/Calc3D.py +++ b/Calc3D.py @@ -19,7 +19,7 @@ _ = lang.gettext def create_window(): - with open(os.path.expanduser('setts.json')) as f: + with open('setts.json') as f: theme = json.load(f)['settings']['theme'] Sgi.theme(theme) menu_def = [ @@ -81,7 +81,7 @@ def main(): Sgi.popup_ok(not_connect) elif event == _('Рассчитать'): - with open(os.path.expanduser('setts.json')) as f: + with open('setts.json') as f: params = json.load(f)["settings"] try: hours = float(values[1]) diff --git a/setts.py b/setts.py index 5f87d9a..884c106 100644 --- a/setts.py +++ b/setts.py @@ -8,7 +8,7 @@ from lists import themes_list, lang_list, currency_list def language(): - with open(os.path.expanduser('setts.json')) as file: + with open('setts.json') as file: old_data = json.load(file) if old_data['settings']["locale"] == 'English': locale = 'en_US' diff --git a/update.py b/update.py index d74355d..83fa2ab 100644 --- a/update.py +++ b/update.py @@ -2,7 +2,6 @@ import requests import webbrowser import json import PySimpleGUI as Sgi -import os import gettext from texts import ver @@ -15,7 +14,7 @@ _ = lang.gettext def upd_check(): - with open(os.path.expanduser('setts.json')) as json_file: + with open('setts.json') as json_file: data = json.load(json_file) set_theme = data["settings"]["theme"] @@ -60,7 +59,7 @@ def upd_check(): def upd_start(): - with open(os.path.expanduser('~\Documents\Calc3DbyRisen\setts.json')) as json_file: + with open('setts.json') as json_file: data = json.load(json_file) set_theme = data["settings"]["theme"]