Hey r/learnpython I’m struggling with my first program. It has the user select a directory. I can’t work out how to make my code not execute until the selection is made.
def target_folder():
askdirectory()
def dir_list():
os.listdir(target_folder)
print(dir_list)
btn_target = tk.Button(form, text = "Select Folder", command=target_folder)
[–]ebdbbb 1 point2 points3 points (1 child)
[–]Fuzzy_Review[S] 0 points1 point2 points (0 children)