puppet_v4.py 文件源码

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

项目:puppet 作者: Raytone-D 项目源码 文件源码
def copy_data(self, hCtrl, key=0):    # background mode
        "?CVirtualGridCtrl|Custom<n>??????????????????"
        if key:
            self.switch_tab(self.two_way, key)    # ?????('W')???('E')???('R')

        start = time.time()
        print("??????????????...")
        # ?????????????3?...orz
        for i in range(10):
            time.sleep(0.3)
            op.SendMessageW(hCtrl, MSG['WM_COMMAND'], MSG['COPY_DATA'], NODE['FORM'][-1])
            ret = pyperclip.paste().splitlines()
            if len(ret) > 1:
                break

        temp = (x.split('\t') for x in ret)
        header = next(temp)
        if '????' in header:
            header.insert(header.index('????'), '??')
            header.remove('????')
        print('IT TAKE {} SECONDS TO GET REAL-TIME DATA'.format(time.time() - start))
        return tuple(dict(zip(header, x)) for x in temp)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号