[issue3177] Add shutil.open
Larry Hastings
report at bugs.python.org
Fri May 25 13:40:02 CEST 2012
Larry Hastings <larry at hastings.org> added the comment:
> As an example, ``os.startfile("a.py")`` will usually run `a.py`
> in the Python interpreter, while ``xdg-open a.py`` it will
> usually open the source code in an editor on Linux.
Well, so how about on UNIX shutil.launch (or whatever it's called) first checks to see if we're referring to a file. If we are, check to see if it's marked executable. If it is, execute it under a shell. Failing *that* we could run xdg-open where available.
----------
nosy: +larry
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue3177>
_______________________________________
More information about the Python-bugs-list
mailing list