-
Notifications
You must be signed in to change notification settings - Fork 1
/
test_gui.py
31 lines (23 loc) · 858 Bytes
/
test_gui.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
import sys,os
from tkinter import Tk
from tkinter import filedialog as fd
from tkinter import messagebox as mb
from tkinter import Button
def main():
root = Tk()
root.withdraw()
response = mb.askokcancel('Warning', " ".join('This program \
permanently removes the label image from the selected \
WSIs. It is recommended that you do not do this on \
original or sole copy files.'.split()),icon='warning')
if not response:
sys.exit()
script_path = (os.path.dirname(os.path.realpath(__file__)))
dir = fd.askdirectory(initialdir=script_path,title='Select directory')
#fn = fd.askopenfilename(filetypes = (("WSI", "*.tplate")
# ,("HTML files", "*.html;*.htm")
# ,("All files", "*.*") ))
root.destroy()
input("Press Enter to close...")
if __name__ == '__main__':
main()