[Tutor] Open a directory in the default file manager

Tim Michelsen timmichelsen at gmx-topmail.de
Thu May 15 20:10:05 CEST 2008


Hello,
is there any function/module that allows me to open a directory in the 
default file manager of a operating system?

Here I a piece of code how to open a URL in the default webbrowser:

http://www.python.org/doc/lib/module-webbrowser.html

import webbrowser
myurl = 'http://www.python.org'
webbrowser.open_new_tab(myurl)


I just wanna do the same with a directory.

The function should open Explorer on Windows, Nautilus on Gnome, Thunar 
onn XFCE4, ...

Thanks for your help in advance.

Regards,
Timmie



More information about the Tutor mailing list