From 95ae888c3221022520fbce11e0da0f3f2e6cfaec Mon Sep 17 00:00:00 2001 From: arsam Date: Fri, 18 Sep 2026 23:13:38 +0330 Subject: [PATCH] Import source: main Import the existing local project snapshot. This commit organizes existing files; it does not represent newly developed functionality. --- main.py | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 main.py diff --git a/main.py b/main.py new file mode 100644 index 0000000..9d963d6 --- /dev/null +++ b/main.py @@ -0,0 +1,26 @@ +import subprocess +import sys +from pathlib import Path + + +BASE_DIR = Path(__file__).resolve().parent + +telegram_file = BASE_DIR / "telebot.py" +rubika_file = BASE_DIR / "rub.py" + +telegram_proc = None +rubika_proc = None + +try: + rubika_proc = subprocess.Popen([sys.executable, str(rubika_file)]) + telegram_proc = subprocess.Popen([sys.executable, str(telegram_file)]) + + rubika_proc.wait() + telegram_proc.wait() + +except KeyboardInterrupt: + pass +finally: + for proc in [telegram_proc, rubika_proc]: + if proc and proc.poll() is None: + proc.terminate()