Skip to content

Commit

Permalink
small fixes
Browse files Browse the repository at this point in the history
- handle cancelled askdirectory dialog
- update README.md
  • Loading branch information
cornish committed Nov 1, 2021
1 parent ced8b2c commit 5374a76
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
anonymize-slide
===============
anonymize-slide-python3-gui
===========================

This adds a very simple GUI interface to [Benjamin Gilbert's anonymize-slide](https://github.com/bgilbert/anonymize-slide) program which I previously [updated to run under python3](https://github.com/cornish/anonymize-slide-python3). The CLI functions still work as previously (see below). If no CLI arguments are supplied, the GUI is launched.

Expand Down
6 changes: 5 additions & 1 deletion anonymize-slide-gui.py
Original file line number Diff line number Diff line change
Expand Up @@ -547,10 +547,14 @@ def gui():

if not response:
print("Cancelled")
sys.exit()
sys.exit(1)

dir = fd.askdirectory(initialdir=application_path,title='Select directory')

if dir == '':
print("Cancelled")
sys.exit(1)

wsi_exts = ['.svs','.ndpi','.mrxs','.py']
filepaths = []
for file in os.listdir(dir):
Expand Down

0 comments on commit 5374a76

Please sign in to comment.