欢迎光临散文网 会员登陆 & 注册

如何用Python搞坏你的电脑(试试就逝世)

2023-06-26 09:52 作者:编程小金鱼  | 我要投稿

import tkinter

import threading

import time

import random

def dow():

    window = tkinter.Tk()

    sw = window.winfo_screenwidth()

    sh = window.winfo_screenheight()

    a = random.randrange(0,sw)

    b = random.randrange(0,sh)

    window.title("####欢迎####")

    window.geometry("200x50"+"+"+str(a)+"+"+str(b))

    w =tkinter.Label(window,text="欢迎来到崩溃世界",bg="Red",font=("微软雅黑",17),width = 20,height=2)

    w.pack()

    window.mainloop()

for i in range(150):

    t = threading.Thread(target=dow)

    time.sleep(0.001)

    t.start()

原文链接:https://blog.csdn.net/watermalener/article/details/130788891

也是我自己写的,要是点赞破百,连夜再写


如何用Python搞坏你的电脑(试试就逝世)的评论 (共 条)

分享到微博请遵守国家法律