From 806bfbbce330486d32a3339bb9be57cf1bd53804 Mon Sep 17 00:00:00 2001 From: Idan Pazi Date: Fri, 8 Mar 2024 10:58:12 +0200 Subject: [PATCH] previewer raise_signal instead of interrupt_main tested on windows, python 3.11 and ubuntu with python 3.10 --- previewer/__init__.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/previewer/__init__.py b/previewer/__init__.py index a37f001..01c35bf 100644 --- a/previewer/__init__.py +++ b/previewer/__init__.py @@ -6,7 +6,6 @@ signal.signal(signal.SIGINT, signal.SIG_IGN) import threading -import _thread import os import io import ast @@ -146,7 +145,7 @@ def ask_restart(self): def ctrl_c(self): print('sending SIGINT') - _thread.interrupt_main() + signal.raise_signal(signal.SIGINT) def run(self): if self.interactive: