From 8d259a6c0020f6f0e002df6642d159c4755f9d62 Mon Sep 17 00:00:00 2001 From: Alan Hamlett Date: Tue, 23 Jul 2013 14:03:25 -0700 Subject: [PATCH] not using sys.executable for python path --- sublime-wakatime.py | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/sublime-wakatime.py b/sublime-wakatime.py index 9e06df8..cf83017 100644 --- a/sublime-wakatime.py +++ b/sublime-wakatime.py @@ -11,7 +11,6 @@ import sublime import sublime_plugin import platform -import sys import time import uuid from os.path import expanduser, dirname, realpath, isfile, join, exists @@ -53,12 +52,10 @@ def api(targetFile, timestamp, isWrite=False, endtime=0): if not targetFile: targetFile = LAST_FILE if targetFile: - - python_binary = sys.executable - if platform.system() == 'Windows' and exists(python_binary+'w'): - python_binary = python_binary + 'w' - - cmd = [python_binary, API_CLIENT, + python = 'python' + if platform.system() == 'Windows' and exists(python+'w'): + python = python+'w' + cmd = [python, API_CLIENT, '--file', targetFile, '--time', str('%f' % timestamp), '--plugin', 'sublime-wakatime/%s' % __version__,