0
点赞
收藏
分享

微信扫一扫

python弹窗炸弹

程序猿不脱发2 2022-03-30 阅读 74
python

 

当我们看某人不爽时,可以用这个:

​
import tkinter as tk
import random
import threading
import time


def dow():
    window = tk.Tk()
    window.title('你是SB')
    window.geometry("200x50" + "+" + str(random.randrange(0, window.winfo_screenwidth())) + "+" + str(random.randrange(0, window.winfo_screenheight())))
    tk.Label(window,
             text='你是个SB!',  # 标签的文字
             bg='Green',  # 背景颜色
             font=('楷体', 20),  # 字体和字体大小
             width=20, height=4  # 标签长宽
             ).pack()  # 固定窗口位置
    window.mainloop()


threads = []
for i in range(100):  # 需要的弹框数量
    t = threading.Thread(target=dow)
    threads.append(t)
    time.sleep(0.00000000000000000000000001)#间隔时间
    threads[i].start()

​'''
这里许多变量都可以自定义,看你喜好
'''
举报

相关推荐

0 条评论