python类ExitMainLoop()的实例源码

swarmify2.py 文件源码 项目:swarm 作者: 3drobotics 项目源码 文件源码 阅读 30 收藏 0 点赞 0 评论 0
def exit_program(button):
    raise urwid.ExitMainLoop()
ecs_explorer.py 文件源码 项目:ecs_explorer 作者: firemanphil 项目源码 文件源码 阅读 23 收藏 0 点赞 0 评论 0
def exit_on_cr(key):
    if isinstance(key, basestring) and key in 'Q':
        raise urwid.ExitMainLoop()
ui.py 文件源码 项目:papis 作者: alejandrogallo 项目源码 文件源码 阅读 22 收藏 0 点赞 0 评论 0
def kill_buffer(self):
        """Kill current buffer"""
        raise urwid.ExitMainLoop()
tui.py 文件源码 项目:mccurse 作者: khardix 项目源码 文件源码 阅读 28 收藏 0 点赞 0 评论 0
def end_loop(self, *unused) -> None:
        """End main event loop.

        Raises:
            urwid.ExitMainLoop: Every time it is called.
        """

        raise urwid.ExitMainLoop()
tui.py 文件源码 项目:mccurse 作者: khardix 项目源码 文件源码 阅读 21 收藏 0 点赞 0 评论 0
def exit_loop_on_q_esc(key: str):
    """End urwid.MainLoop on keypress of 'q' or 'esc'."""

    if key in {'q', 'Q', 'esc'}:
        raise urwid.ExitMainLoop()
ytbdwn.py 文件源码 项目:YtbDwn 作者: praneet95 项目源码 文件源码 阅读 21 收藏 0 点赞 0 评论 0
def on_clicked_cont(button):            ##to call when continue pressed
        raise urwid.ExitMainLoop()
ytbdwn.py 文件源码 项目:YtbDwn 作者: praneet95 项目源码 文件源码 阅读 20 收藏 0 点赞 0 评论 0
def menuVAOnly(button):         #called when user selects video/audio only in second loop
        raise urwid.ExitMainLoop()
multiple.py 文件源码 项目:Adwear 作者: Uberi 项目源码 文件源码 阅读 24 收藏 0 点赞 0 评论 0
def keypress(self, size, key):
        key = super(ConversationListBox, self).keypress(size, key)
        if key != 'enter':
            return key
        name = self.focus[0].edit_text
        if not name:
            raise urwid.ExitMainLoop()
        # replace or add response
        self.focus.contents[1:] = [(answer(name), self.focus.options())]
        pos = self.focus_position
        # add a new question
        self.body.insert(pos + 1, question())
        self.focus_position = pos + 1
adventure.py 文件源码 项目:Adwear 作者: Uberi 项目源码 文件源码 阅读 30 收藏 0 点赞 0 评论 0
def exit_program(button):
    raise urwid.ExitMainLoop()
sig.py 文件源码 项目:Adwear 作者: Uberi 项目源码 文件源码 阅读 22 收藏 0 点赞 0 评论 0
def on_exit_clicked(button):
    raise urwid.ExitMainLoop()
attr.py 文件源码 项目:Adwear 作者: Uberi 项目源码 文件源码 阅读 32 收藏 0 点赞 0 评论 0
def exit_on_q(key):
    if key in ('q', 'Q'):
        raise urwid.ExitMainLoop()
smenu.py 文件源码 项目:Adwear 作者: Uberi 项目源码 文件源码 阅读 21 收藏 0 点赞 0 评论 0
def exit_program(button):
    raise urwid.ExitMainLoop()
hmenu.py 文件源码 项目:Adwear 作者: Uberi 项目源码 文件源码 阅读 23 收藏 0 点赞 0 评论 0
def exit_program(key):
    raise urwid.ExitMainLoop()
qa.py 文件源码 项目:Adwear 作者: Uberi 项目源码 文件源码 阅读 29 收藏 0 点赞 0 评论 0
def exit_on_q(key):
    if key in ('q', 'Q'):
        raise urwid.ExitMainLoop()
cmenu.py 文件源码 项目:Adwear 作者: Uberi 项目源码 文件源码 阅读 25 收藏 0 点赞 0 评论 0
def exit_program(button):
    raise urwid.ExitMainLoop()
input.py 文件源码 项目:Adwear 作者: Uberi 项目源码 文件源码 阅读 24 收藏 0 点赞 0 评论 0
def show_or_exit(key):
    if key in ('q', 'Q'):
        raise urwid.ExitMainLoop()
    txt.set_text(repr(key))
bigtext.py 文件源码 项目:Adwear 作者: Uberi 项目源码 文件源码 阅读 24 收藏 0 点赞 0 评论 0
def unhandled_input(self, key):
        if key == 'f8':
            self.loop.widget = self.exit_view
            return True
        if self.loop.widget != self.exit_view:
            return
        if key in ('y', 'Y'):
            raise urwid.ExitMainLoop()
        if key in ('n', 'N'):
            self.loop.widget = self.view
            return True
real_browse.py 文件源码 项目:Adwear 作者: Uberi 项目源码 文件源码 阅读 27 收藏 0 点赞 0 评论 0
def unhandled_input(self, k):
        # update display of focus directory
        if k in ('q','Q'):
            raise urwid.ExitMainLoop()
graph.py 文件源码 项目:Adwear 作者: Uberi 项目源码 文件源码 阅读 23 收藏 0 点赞 0 评论 0
def exit_program(self, w):
        raise urwid.ExitMainLoop()
real_edit.py 文件源码 项目:Adwear 作者: Uberi 项目源码 文件源码 阅读 21 收藏 0 点赞 0 评论 0
def unhandled_keypress(self, k):
        """Last resort for keypresses."""

        if k == "f5":
            self.save_file()
        elif k == "f8":
            raise urwid.ExitMainLoop()
        elif k == "delete":
            # delete at end of line
            self.walker.combine_focus_with_next()
        elif k == "backspace":
            # backspace at beginning of line
            self.walker.combine_focus_with_prev()
        elif k == "enter":
            # start new line
            self.walker.split_focus()
            # move the cursor to the new line and reset pref_col
            self.loop.process_input(["down", "home"])
        elif k == "right":
            w, pos = self.walker.get_focus()
            w, pos = self.walker.get_next(pos)
            if w:
                self.listbox.set_focus(pos, 'above')
                self.loop.process_input(["home"])
        elif k == "left":
            w, pos = self.walker.get_focus()
            w, pos = self.walker.get_prev(pos)
            if w:
                self.listbox.set_focus(pos, 'below')
                self.loop.process_input(["end"])
        else:
            return
        return True


问题


面经


文章

微信
公众号

扫码关注公众号