mirror of
https://github.com/wakatime/sublime-wakatime.git
synced 2023-08-10 21:13:02 +03:00
fix #12 to always use pythonw
This commit is contained in:
parent
a4545d04ed
commit
3bd9c31247
@ -51,18 +51,14 @@ if not isfile(join(expanduser('~'), '.wakatime.conf')):
|
|||||||
def python_binary():
|
def python_binary():
|
||||||
python = 'python'
|
python = 'python'
|
||||||
if platform.system() == 'Windows':
|
if platform.system() == 'Windows':
|
||||||
|
python = 'pythonw'
|
||||||
try:
|
try:
|
||||||
Popen([python, '--version'])
|
Popen([python, '--version'])
|
||||||
except:
|
except:
|
||||||
for path in glob.iglob('/python*'):
|
for path in glob.iglob('/python*'):
|
||||||
if exists(realpath(join(path, 'python.exe'))):
|
if exists(realpath(join(path, 'pythonw.exe'))):
|
||||||
python = realpath(join(path, 'python'))
|
python = realpath(join(path, 'pythonw'))
|
||||||
break
|
break
|
||||||
try:
|
|
||||||
Popen([python+'w', '--version'])
|
|
||||||
python = python+'w'
|
|
||||||
except:
|
|
||||||
pass
|
|
||||||
return python
|
return python
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user