def _which(editor):
try:
editor_path = subprocess.check_output(['which', editor], stderr=subprocess.STDOUT).strip()
if six.PY3:
editor_path = editor_path.decode()
except subprocess.CalledProcessError:
editor_path = None
return editor_path
评论列表
文章目录