, i was wondering , how do i use a gtk dialog via pyGTK to let me select a folder and it return all the files in that folder?
ive got some code that works to select multiple files but i cant seem to do the above.
just ask for any more details
, i was wondering , how do i use a gtk dialog via pyGTK to let me select a folder and it return all the files in that folder?
ive got some code that works to select multiple files but i cant seem to do the above.
just ask for any more details
Jeremy Clarkson - "A Dazzling Hero of Political Incorrectness"
My LastFM profile
want to Give each GTK program its own theme? well look Here
If you setup your FileChooserDialog to select a folder, you can use glob.glob to list the the contents of the directory returned by get_filename().
thx, but thats what i dont know how to do, set my filechooserdialog to select a folder.
Jeremy Clarkson - "A Dazzling Hero of Political Incorrectness"
My LastFM profile
want to Give each GTK program its own theme? well look Here
you need to set the action to gtk.FILE_CHOOSER_ACTION_SELECT_FOLDER
thanks duff worked like a charm,
is there a way to check whether the item returned by glob in a folder is another folder or or a file?
last question, i promise
Last edited by Hairy_Palms; January 4th, 2007 at 01:46 AM.
Jeremy Clarkson - "A Dazzling Hero of Political Incorrectness"
My LastFM profile
want to Give each GTK program its own theme? well look Here
You could get that information from os.stat, but if you're needing to dive into nested directories, try os.walk instead of glob.
Bookmarks