Files
arsam 5bb27c4390 Import source: main
Import the existing local project snapshot. This commit organizes existing files; it does not represent newly developed functionality.
2026-09-18 23:14:45 +03:30

27 lines
566 B
Python

import subprocess
import sys
from pathlib import Path
BASE_DIR = Path(__file__).resolve().parent
telegram_file = BASE_DIR / "telebot.py"
bale_file = BASE_DIR / "bale.py"
telegram_proc = None
bale_proc = None
try:
bale_proc = subprocess.Popen([sys.executable, str(bale_file)])
telegram_proc = subprocess.Popen([sys.executable, str(telegram_file)])
bale_proc.wait()
telegram_proc.wait()
except KeyboardInterrupt:
pass
finally:
for proc in [telegram_proc, bale_proc]:
if proc and proc.poll() is None:
proc.terminate()