LanguageTool.py 文件源码

python
阅读 23 收藏 0 点赞 0 评论 0

项目:languagetool-sublime 作者: gtarawneh 项目源码 文件源码
def run(self, edit):
        settings = sublime.load_settings(lt_settings_file)
        jarPath = settings.get('languagetool_jar')
        if jarPath:
            if os.path.isfile(jarPath):
                sublime.status_message('Starting local LanguageTool server ...')
                cmd = ['java', '-jar', jarPath, '-t']
                if sublime.platform() == "windows":
                    p = subprocess.Popen(cmd, stdin=subprocess.PIPE, stdout=subprocess.PIPE, stderr=subprocess.PIPE, shell=True, creationflags=subprocess.SW_HIDE)
                else:
                    p = subprocess.Popen(cmd, stdin=subprocess.PIPE, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
            else:
                showPanelText('Error, could not find LanguageTool\'s JAR file (%s)\n\nPlease install LT in this directory or modify the `languagetool_jar` setting.' % jarPath)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号