forked from thonny/thonny
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Refactor backend mainloop and common methods, thonny#1294
- Loading branch information
1 parent
4ef08bf
commit a9951b0
Showing
10 changed files
with
656 additions
and
464 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,28 @@ | ||
from _thread import interrupt_main | ||
from threading import Thread | ||
from time import sleep | ||
import os | ||
import signal | ||
|
||
|
||
def inter(): | ||
print("interwait") | ||
sleep(1) | ||
print("interrupting") | ||
interrupt_main() | ||
#interrupt_main() | ||
os.kill(os.getpid(), signal.SIGINT) | ||
#os.raise_signal(signal.SIGINT) | ||
print("interrupted") | ||
|
||
|
||
Thread(target=inter).start() | ||
|
||
#Thread(target=inter).start() | ||
#""" | ||
import tkinter | ||
root = tkinter.Tk() | ||
#root.focus_set() | ||
root.mainloop() | ||
#""" | ||
|
||
#sleep(5) | ||
|
||
print("done") |
Oops, something went wrong.