Default directory for File class?

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Default directory for File class?

Hanno Klemm
Hi,

I try to use the file browser for a file trait. However, I would like
to initialise it with a search directory. So far, however, I am failing.
Is there a possibility to do this? Below is a minimal example of what i
am trying to do.


# Have a look for all files in the directory /usr and start looking
from there.
class testfile(HasTraits):
     rfile = File('/usr/')

tt = testfile()
tt.configure_traits()

The file browser that pops up should now start in the directory /usr
rather than in the directory where I started the script.

Thanks,
Hanno
_______________________________________________
Enthought-Dev mailing list
[hidden email]
https://mail.enthought.com/mailman/listinfo/enthought-dev