def update_interpreter_build_system(self, cmd):
"""Updates the project and adds/modifies the build system
"""
view = active_view()
if get_settings(view, 'auto_python_builder_enabled', True) is False:
return
if is_remote_session(view):
return
if cmd is None:
sublime.message_dialog(
'Your python interpreter is not set or is invalid'
)
return
project = self._get_project()
if project.get('build_systems', False) is not False:
if type(project['build_systems']) is list:
done = False
current_list = project['build_systems']
for i in range(len(current_list)):
build = current_list[i]
if build['name'] == 'Anaconda Python Builder':
current_list[i] = self._parse_tpl(cmd)
done = True
break
if not done:
project['build_systems'].append(self._parse_tpl(cmd))
else:
sublime.message_dialog(
'Your project build_systems is messed up'
)
else:
project.update({
'build_systems': [self._parse_tpl(cmd)]
})
self._save_project(project)
评论列表
文章目录