From 900b75056a574465525399a0a4258f979833fde3 Mon Sep 17 00:00:00 2001 From: Alan Hamlett Date: Tue, 23 Jul 2013 12:11:51 -0700 Subject: [PATCH] only using pythonw if it exists --- sublime-wakatime.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sublime-wakatime.py b/sublime-wakatime.py index a1ecc93..9e06df8 100644 --- a/sublime-wakatime.py +++ b/sublime-wakatime.py @@ -14,7 +14,7 @@ import platform import sys import time import uuid -from os.path import expanduser, dirname, realpath, isfile, join +from os.path import expanduser, dirname, realpath, isfile, join, exists from subprocess import call, Popen @@ -55,7 +55,7 @@ def api(targetFile, timestamp, isWrite=False, endtime=0): if targetFile: python_binary = sys.executable - if platform.system() == 'Windows': + if platform.system() == 'Windows' and exists(python_binary+'w'): python_binary = python_binary + 'w' cmd = [python_binary, API_CLIENT,