August 2nd, 2005, 12:23 PM
TkInter folder browser and folder creator
I think that everybody will be having idea about Folder browser and folder creator (mkdir) dialog box in window.
Does any body have any idea that how to get this done using Tkinter?
A dialog box which can display list of folder in their tree heirarchy and then can all creating folder in selected folder location.
Thanks in advance
August 2nd, 2005, 02:11 PM
you have to program it
you'll use text widget to program it and then you do mkdir from os to make them or remove them or something...
Those people who think they know everything are a great annoyance to those of us who do.
August 2nd, 2005, 05:16 PM
you can use the os module to gather all the information about the directorys and modify them as well. There is a good resource for the os module on pythons web site (http://docs.python.org/lib/module-os.html) I recommend that you look into the Files and Directorys part of the referance (http://docs.python.org/lib/os-file-dir.html)
Sorry, but no one is going to code something like that for you, since it is kinda lengthy. If you are looking for a build in weget that does this all for you in tkinter then you looking for something that isn't there. You will have to make it yourself. It shouldn't be to hard, You can probably go to the aspn cookbook on python and find half the code that you need to do this. Good luck!
August 4th, 2005, 09:58 AM
With Tkinter it is simple, run this code:
fname = tkFileDialog.askopenfilename()
August 4th, 2005, 10:08 AM
Well, thats nice to open a file, but that's not what d0153030 wants.
Originally Posted by Dietrich
As I understood him, he wants a tree-widget to show the directory-structure, and he wants to be able to create directories.
Tkinter doesn't have a tree-widget, but here is a nice one to download
August 4th, 2005, 04:25 PM
Thanks for all of your comments.
I will try to code stuff by using Entry widget and tree widget as per last post.
I will try to use the OS commands to browse for the \directory structure.
thanks a lot