tkFileDialog question

r rt8396 at gmail.com
Fri Nov 13 22:05:32 EST 2009


Opps: And here i go making a clown of myself again...

import Tkinter as tk
from tkFileDialog import askdirectory
import os

root = tk.Tk()
root.withdraw()

folder = askdirectory()
#make sure to do this somewhere that will always execute!
root.destroy()
if folder:
    print os.listdir(folder)

root.mainloop()

r... just another would be language designer



More information about the Python-list mailing list