From 2920ac8f32934715445e26cf7b7a284607f1e446 Mon Sep 17 00:00:00 2001 From: Ivan Date: Thu, 13 Jul 2023 16:31:12 +0300 Subject: [PATCH] =?UTF-8?q?=D0=9F=D0=BE=D1=84=D0=B8=D0=BA=D1=88=D0=B5?= =?UTF-8?q?=D0=BD=D1=8B=20=D0=BD=D0=B5=D0=B7=D0=BD=D0=B0=D1=87=D0=B8=D1=82?= =?UTF-8?q?=D0=B5=D0=BB=D1=8C=D0=BD=D1=8B=D0=B5=20=D0=BE=D1=88=D0=B8=D0=B1?= =?UTF-8?q?=D0=BA=D0=B8=20=D0=B2=20=D0=BE=D1=84=D0=BE=D1=80=D0=BC=D0=BB?= =?UTF-8?q?=D0=B5=D0=BD=D0=B8=D0=B8,=20=D0=B4=D0=BE=D0=B1=D0=B0=D0=B2?= =?UTF-8?q?=D0=BB=D0=B5=D0=BD=20=D0=B2=D1=8B=D0=B1=D0=BE=D1=80=20=D0=B2?= =?UTF-8?q?=D0=B0=D0=BB=D1=8E=D1=82=D1=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Calc3D.py | 4 ++-- setts.py | 2 +- update.py | 5 ++--- 3 files changed, 5 insertions(+), 6 deletions(-) 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"]