From d442b790b708c8387b3d57d397ae9f6d8ec27017 Mon Sep 17 00:00:00 2001 From: Lowa Date: Mon, 17 Feb 2025 17:55:32 +0300 Subject: [PATCH] Add sys.path modification to support module imports - Append src directory to Python module search path - Ensure proper module resolution for local imports - Improve project structure import handling --- src/ui/main_window.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/ui/main_window.py b/src/ui/main_window.py index 3e06c02..bfa4667 100644 --- a/src/ui/main_window.py +++ b/src/ui/main_window.py @@ -1,6 +1,12 @@ #!/usr/bin/env python3 # -*- coding: utf-8 -*- +import sys +import os + +# Добавляем директорию src в путь поиска модулей +sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__)))) + import tkinter as tk from tkinter import ttk, messagebox from typing import Optional, Dict, Any