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