tkFileDialog.askdirectory root directory ?
mfranklin1 at gatwick.westerngeco.slb.com
Tue Mar 2 06:38:44 CET 2004
> I have the following problem. I use the tkFileDialog.askdirectory dialog to
> allow users of my application to pick some subfolder from 'C:/my_app'
> directory. I use initialdir='C:/my_app' option to set 'C:/my_app' as initial
> directory. But I want my initial directory to be also a root directory, so
> the user cannot pick any directory outside 'C:/my_app' folder. I have no
> idea how to do it using standard tkFileDialog.askdirectory. Is that
> Thank you in advance for any hints.
> Best wishes,
Unles there is a speacial windows extra thingy I don't think you could
stop the user selecting a directory not below C:/my_app however you can
at least start the directory selector with that as it's initial
directory like so:
More information about the Python-list