From cc166ab27ff85555114cb37ba668e72da9604103 Mon Sep 17 00:00:00 2001 From: Jimmy Selgen Nielsen Date: Thu, 18 Jul 2013 15:14:02 +0200 Subject: [PATCH] Fix cmd windows popup when running under Windows. --- sublime-wakatime.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/sublime-wakatime.py b/sublime-wakatime.py index 7d84029..259d3ff 100644 --- a/sublime-wakatime.py +++ b/sublime-wakatime.py @@ -11,7 +11,7 @@ import time import uuid from os.path import expanduser, dirname, realpath, isfile from subprocess import call, Popen - +import platform import sublime import sublime_plugin @@ -51,7 +51,12 @@ def api(targetFile, timestamp, isWrite=False, endtime=0): if not targetFile: targetFile = LAST_FILE if targetFile: - cmd = ['python', API_CLIENT, + + python_cmd = 'python' + if(platform.system() == 'Windows'): + python_cmd = 'pythonw' + + cmd = [python_cmd, API_CLIENT, '--file', targetFile, '--time', str('%f' % timestamp), '--plugin', 'sublime-wakatime/%s' % __version__,