only using pythonw if it exists

This commit is contained in:
Alan Hamlett 2013-07-23 12:11:51 -07:00
parent 1e0b8ec55d
commit 900b75056a

View File

@ -14,7 +14,7 @@ import platform
import sys import sys
import time import time
import uuid 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 from subprocess import call, Popen
@ -55,7 +55,7 @@ def api(targetFile, timestamp, isWrite=False, endtime=0):
if targetFile: if targetFile:
python_binary = sys.executable python_binary = sys.executable
if platform.system() == 'Windows': if platform.system() == 'Windows' and exists(python_binary+'w'):
python_binary = python_binary + 'w' python_binary = python_binary + 'w'
cmd = [python_binary, API_CLIENT, cmd = [python_binary, API_CLIENT,