<div dir="ltr"><div class="gmail_quote">On Sat, Jul 9, 2011 at 6:02 AM, Chris Rebert <span dir="ltr"><<a href="mailto:pyideas@rebertia.com">pyideas@rebertia.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">

<div class="im">On Sat, Jul 9, 2011 at 2:35 AM, cool-RR <<a href="mailto:cool-rr@cool-rr.com">cool-rr@cool-rr.com</a>> wrote:<br>
> Hello,<br>
> I have the path of a certain folder. I want to open it using the default<br>
> folder explorer for that system. For example, if it's a Windows computer, I<br>
> want to use Explorer, if it's Linux, I want to use Nautilus or whatever is<br>
> the default there, if it's Mac, I want to use whatever Mac OS's explorer is<br>
> called.<br>
> I asked this on StackOverflow:<br>
> <a href="http://stackoverflow.com/questions/6631299/python-opening-a-folder-in-explorer-nautilus-mac-thingie" target="_blank">http://stackoverflow.com/questions/6631299/python-opening-a-folder-in-explorer-nautilus-mac-thingie</a><br>


> But it seems that Python doesn't offer a cross-platform way to do this.<br>
<br>
</div>Invoking the appropriate platform-specific open-with-default-program<br>
command with a folder argument should work:<br>
<a href="http://stackoverflow.com/questions/434597/open-document-with-default-application-in-python" target="_blank">http://stackoverflow.com/questions/434597/open-document-with-default-application-in-python</a><br>
<br>
If anything should be added to the std lib, I would say it should be<br>
this rather than a more narrow open-with-platform's-file-manager<br>
function.<br>
<br>
Cheers,<br>
<font color="#888888">Chris<br>
</font></blockquote></div><br>I agree, it's better to introduce an open-with-default-program function.<div><br></div><div>It seems that `os.startfile` is supposed to do this:</div><div><br></div><div><a href="http://docs.python.org/dev/library/os.html#os.startfile">http://docs.python.org/dev/library/os.html#os.startfile</a></div>

<div><br></div><div>But it's only available under Windows. Perhaps the solution is to implement it under Linux and Mac as well, so we don't need to introduce a new function?</div><div><br></div><div><br></div><div>

Ram.</div></div>