mirror of
https://github.com/wakatime/sublime-wakatime.git
synced 2023-08-10 21:13:02 +03:00
look for python in system PATH again
This commit is contained in:
parent
03acea6e25
commit
94343e5b07
@ -131,6 +131,7 @@ def python_binary():
|
||||
|
||||
# look for python in PATH and common install locations
|
||||
paths = [
|
||||
None,
|
||||
'/',
|
||||
'/usr/local/bin/',
|
||||
'/usr/bin/',
|
||||
@ -219,13 +220,17 @@ def find_python_from_registry(location, reg=None):
|
||||
|
||||
|
||||
def find_python_in_folder(folder):
|
||||
path = os.path.realpath(os.path.join(folder, 'pythonw'))
|
||||
path = os.path.realpath('pythonw')
|
||||
if folder is not None:
|
||||
path = os.path.realpath(os.path.join(folder, 'pythonw'))
|
||||
try:
|
||||
Popen([path, '--version'])
|
||||
return path
|
||||
except:
|
||||
pass
|
||||
path = os.path.realpath(os.path.join(folder, 'python'))
|
||||
path = os.path.realpath('python')
|
||||
if folder is not None:
|
||||
path = os.path.realpath(os.path.join(folder, 'python'))
|
||||
try:
|
||||
Popen([path, '--version'])
|
||||
return path
|
||||
|
Loading…
Reference in New Issue
Block a user