interact.py 文件源码

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

项目:remoteControlPPT 作者: htwenning 项目源码 文件源码
def HookHandlers(self):
        # Hook menu command (executed when a menu item with that ID is selected from a menu/toolbar
        self.HookCommand(self.OnSelectBlock, win32ui.ID_EDIT_SELECT_BLOCK)
        self.HookCommand(self.OnEditCopyCode, ID_EDIT_COPY_CODE)
        self.HookCommand(self.OnEditExecClipboard, ID_EDIT_EXEC_CLIPBOARD)
        mod = pywin.scintilla.IDLEenvironment.GetIDLEModule("IdleHistory")
        if mod is not None:
            self.history = mod.History(self.idle.text, "\n" + sys.ps2)
        else:
            self.history = None
        # hack for now for event handling.

    # GetBlockBoundary takes a line number, and will return the
    # start and and line numbers of the block, and a flag indicating if the
    # block is a Python code block.
    # If the line specified has a Python prompt, then the lines are parsed
    # backwards and forwards, and the flag is true.
    # If the line does not start with a prompt, the block is searched forward
    # and backward until a prompt _is_ found, and all lines in between without
    # prompts are returned, and the flag is false.
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号