Anyone working on a platform-agnostic os.startfile()

There is significant interest in a cross-platform file-launcher.[1][2][3][4] The ideal implementation would be an operating-system-agnostic interface that launches a file for editing or viewing, similar to the way os.startfile() works for Windows, but generalized to allow caller-specification of view vs. edit preference and support all registered os.name operating systems, not just 'nt'. Mercurial has a mature python implementation for cross-platform launching of an editor (either GUI editor or terminal-based editor like vi).[5][6] The python std lib os.startfile obviously works for Windows. The Mercurial functionality could be rolled into os.startfile() with additional named parameters for edit or view preference and gui or non-gui preference. Perhaps that would enable backporting belwo Python 3.x. Or is there a better place to incorporate this multi-platform file launching capability? [1]: http://stackoverflow.com/questions/1856792/intelligently-launching-the-defau... [2]: http://stackoverflow.com/questions/434597/open-document-with-default-applica... [3]: http://stackoverflow.com/questions/1442841/lauch-default-editor-like-webbrow... [4]: http://stackoverflow.com/questions/434597/open-document-with-default-applica... [5]: http://selenic.com/repo/hg-stable/file/2770d03ae49f/mercurial/ui.py [6]: http://selenic.com/repo/hg-stable/file/2770d03ae49f/mercurial/util.py

On Sun, Apr 22, 2012 at 10:21 PM, Hobson Lane <hobsonlane@gmail.com> wrote:
There is an existing open bug that requests such a feature: "Add shutil.open": http://bugs.python.org/issue3177 Cheers, Chris

There's http://pypi.python.org/pypi/desktop/0.4, but it seems to be unmaintained. It provides a an "open" command. On Sunday, April 22, 2012 10:21:10 PM UTC-7, Hobson Lane wrote:

On Sun, Apr 22, 2012 at 10:21 PM, Hobson Lane <hobsonlane@gmail.com> wrote:
There is an existing open bug that requests such a feature: "Add shutil.open": http://bugs.python.org/issue3177 Cheers, Chris

There's http://pypi.python.org/pypi/desktop/0.4, but it seems to be unmaintained. It provides a an "open" command. On Sunday, April 22, 2012 10:21:10 PM UTC-7, Hobson Lane wrote:
participants (3)
-
Chris Rebert
-
Hobson Lane
-
Miki Tebeka