From d1e2f4ab7e0617b8450a130313c40f51da311b19 Mon Sep 17 00:00:00 2001 From: Risen Date: Thu, 13 Jul 2023 20:35:03 +0300 Subject: [PATCH] =?UTF-8?q?=D0=9F=D0=BE=D0=B2=D1=8B=D1=88=D0=B5=D0=BD?= =?UTF-8?q?=D0=B0=20=D1=81=D1=82=D0=B0=D0=B1=D0=B8=D0=BB=D1=8C=D0=BD=D0=BE?= =?UTF-8?q?=D1=81=D1=82=D1=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Calc3D.py | 4 ++-- setts.py | 2 +- texts.py | 2 +- update.py | 1 + 4 files changed, 5 insertions(+), 4 deletions(-) diff --git a/Calc3D.py b/Calc3D.py index 5b9ab25..21b5816 100644 --- a/Calc3D.py +++ b/Calc3D.py @@ -19,7 +19,7 @@ _ = lang.gettext def create_window(): - with open('setts.json') as f: + with open(os.path.expanduser('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('setts.json') as f: + with open(os.path.expanduser('setts.json')) as f: params = json.load(f)["settings"] try: hours = float(values[1]) diff --git a/setts.py b/setts.py index 884c106..5f87d9a 100644 --- a/setts.py +++ b/setts.py @@ -8,7 +8,7 @@ from lists import themes_list, lang_list, currency_list def language(): - with open('setts.json') as file: + with open(os.path.expanduser('setts.json')) as file: old_data = json.load(file) if old_data['settings']["locale"] == 'English': locale = 'en_US' diff --git a/texts.py b/texts.py index 5354874..2a62294 100644 --- a/texts.py +++ b/texts.py @@ -73,4 +73,4 @@ new_sets = (_('Задайте стоимость принтера, \n' new_marge = (_('Задайте процент желаемой наценки\n' 'в настройках (можно просто проставить ноль)')) -ver = '0.6.1' +ver = '0.6.3' diff --git a/update.py b/update.py index 83fa2ab..7e2c7f1 100644 --- a/update.py +++ b/update.py @@ -2,6 +2,7 @@ import requests import webbrowser import json import PySimpleGUI as Sgi +import os import gettext from texts import ver