hunspell_table.py 文件源码

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

项目:ibus-typing-booster 作者: mike-fabian 项目源码 文件源码
def _start_setup(self):
        '''Start the setup tool if it is not running yet'''
        if self._setup_pid != 0:
            pid, dummy_state = os.waitpid(self._setup_pid, os.P_NOWAIT)
            if pid != self._setup_pid:
                # If the last setup tool started from here is still
                # running the pid returned by the above os.waitpid()
                # is 0. In that case just return, don’t start a
                # second setup tool.
                return
            self._setup_pid = 0
        setup_cmd = os.path.join(
            os.getenv('IBUS_HUNSPELL_LIB_LOCATION'),
            'ibus-setup-typing-booster')
        config_file = self._name.replace('typing-booster:', '') + '.conf'
        self._setup_pid = os.spawnl(
            os.P_NOWAIT,
            setup_cmd,
            'ibus-setup-typing-booster',
            '--config-file %s' %config_file)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号