not using sys.executable for python path
This commit is contained in:
parent
900b75056a
commit
8d259a6c00
1 changed files with 4 additions and 7 deletions
|
@ -11,7 +11,6 @@ import sublime
|
||||||
import sublime_plugin
|
import sublime_plugin
|
||||||
|
|
||||||
import platform
|
import platform
|
||||||
import sys
|
|
||||||
import time
|
import time
|
||||||
import uuid
|
import uuid
|
||||||
from os.path import expanduser, dirname, realpath, isfile, join, exists
|
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:
|
if not targetFile:
|
||||||
targetFile = LAST_FILE
|
targetFile = LAST_FILE
|
||||||
if targetFile:
|
if targetFile:
|
||||||
|
python = 'python'
|
||||||
python_binary = sys.executable
|
if platform.system() == 'Windows' and exists(python+'w'):
|
||||||
if platform.system() == 'Windows' and exists(python_binary+'w'):
|
python = python+'w'
|
||||||
python_binary = python_binary + 'w'
|
cmd = [python, API_CLIENT,
|
||||||
|
|
||||||
cmd = [python_binary, API_CLIENT,
|
|
||||||
'--file', targetFile,
|
'--file', targetFile,
|
||||||
'--time', str('%f' % timestamp),
|
'--time', str('%f' % timestamp),
|
||||||
'--plugin', 'sublime-wakatime/%s' % __version__,
|
'--plugin', 'sublime-wakatime/%s' % __version__,
|
||||||
|
|
Loading…
Reference in a new issue