TerminalView.py 文件源码

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

项目:TerminalView 作者: Wramberg 项目源码 文件源码
def run(self, string, current_window_only=True):
        """
        Send a string

        Args:
            string (str): string of characters to send
            current_window_only (bool, optional): constrain terminal search to
                                                  the current ST window only
        """
        if current_window_only:
            windows = [self.window]
        else:
            windows = sublime.windows()

        term_view = None
        for w in windows:
            for v in w.views():
                term_view = TerminalViewManager.load_from_id(v.id())
                if term_view is not None:
                    group, index = w.get_view_index(v)
                    active_view = w.active_view_in_group(group)
                    if active_view == v:
                        break

        if term_view is None:
            utils.ConsoleLogger.log("No terminal found")
            return

        term_view.send_string_to_shell(string)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号