This commit is contained in:
oleting
2020-12-21 10:02:46 +01:00
parent 14d7aaeaff
commit 9aab2a8dce

17
gui.py
View File

@@ -74,8 +74,23 @@ while True:
)
window["-TOUT-"].update(filename)
window["-IMAGE-"].update(filename=filename)
except:
pass
if event == '-JAVA FOLDER-':
folder = values['-JAVA FOLDER-']
print(folder)
try:
file_list = os.listdir(folder)
except:
file_list = []
fnames = [
f
for f in file_list
if os.path.isfile(os.path.join(folder, f))
and f.lower().endswith(('.java', '.txt'))
]
window['-JAVA FILE LIST-'].update(fnames)
window.close()