patch suggestion for webbrowser
Hi, enclosed a patch for webbrowser which will find applications/batch files ending with .com or .cmd too. Yinon Index: Lib/webbrowser.py =================================================================== --- Lib/webbrowser.py (revision 68118) +++ Lib/webbrowser.py (working copy) @@ -103,10 +103,11 @@ if sys.platform[:3] == "win": def _isexecutable(cmd): + win_exts = (".exe", ".com", ".bat", ".cmd") cmd = cmd.lower() - if os.path.isfile(cmd) and cmd.endswith((".exe", ".bat")): + if os.path.isfile(cmd) and cmd.endswith(win_exts): return True - for ext in ".exe", ".bat": + for ext in win_exts: if os.path.isfile(cmd + ext): return True return False
On Thu, Jan 01, 2009 at 02:24:02PM +0200, Yinon Ehrlich wrote:
enclosed a patch for webbrowser which will find applications/batch files ending with .com or .cmd too.
Please submit the patch to the issue tracker: http://bugs.python.org/ Oleg. -- Oleg Broytmann http://phd.pp.ru/ phd@phd.pp.ru Programmers don't die, they just GOSUB without RETURN.
participants (2)
-
Oleg Broytmann -
Yinon Ehrlich