From 3bd9c31247a22babf5c9c8c78aebe85bd7c2b828 Mon Sep 17 00:00:00 2001 From: Alan Hamlett Date: Fri, 2 Aug 2013 17:00:26 -0700 Subject: [PATCH] fix #12 to always use pythonw --- sublime-wakatime.py | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/sublime-wakatime.py b/sublime-wakatime.py index d68cdf1..f00be19 100644 --- a/sublime-wakatime.py +++ b/sublime-wakatime.py @@ -51,18 +51,14 @@ if not isfile(join(expanduser('~'), '.wakatime.conf')): def python_binary(): python = 'python' if platform.system() == 'Windows': + python = 'pythonw' try: Popen([python, '--version']) except: for path in glob.iglob('/python*'): - if exists(realpath(join(path, 'python.exe'))): - python = realpath(join(path, 'python')) + if exists(realpath(join(path, 'pythonw.exe'))): + python = realpath(join(path, 'pythonw')) break - try: - Popen([python+'w', '--version']) - python = python+'w' - except: - pass return python