def get_dirname():
Tk().withdraw()
print("Initializing Dialogue...\nPlease select a directory.")
dirname = askdirectory(initialdir=os.getcwd(),title='Please select a directory')
if len(dirname) > 0:
print ("You chose %s" % dirname)
return dirname
else:
dirname = os.getcwd()
print ("\nNo directory selected - initializing with %s \n" % os.getcwd())
return dirname
评论列表
文章目录