functions.py 文件源码

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

项目:passman 作者: regexpressyourself 项目源码 文件源码
def clipboard(text,prnt, clear):
    '''
    Copy data to clipboard and start a thread to remove it after 20 seconds
    '''
    try:
        pyperclip.copy(text)
        print("Copied to clipboard")
    except:
        print("There was an error copying to clipboard. Do you have xsel installed?")
        quit()

    if prnt:
        print(text)
    if clear:
        global myThread
        if myThread and myThread.is_running():
            myThread.stop()
            myThread.join()
        myThread = StoppingThread(target=timer, args=(20,text,))
        myThread.start()
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号