点击上方“
AirPython
”,选择“
加为星标
”
来源:https://dream.blog.csdn.net/
Python 能做很多无聊,但有意思的事情,例如接下来的一些案例。
使用
pip install pyinstaller
。
过程中如果出现 BUG(一般是编码错误),文末有解决方案
无聊程序之一
while True:
n = input("猜猜我在想啥?")
print("猜错喽")
当然我安装 360 之后,程序没了。有兴趣研究免杀的,可以在给本文点个赞,点赞过 100,我出套 Python 免杀教程。
无聊程序之二
import tkinter.messagebox
while True:
tkinter.messagebox.showerror('Windows 错误','你的电脑正在被攻击!')
运行之后,很就刺激了,如果对方不会杀进程,更刺激。
无聊程序之三
调用默认浏览器,无限打开 CSDN ,让他爱上学习。
import webbrowser
while True:
webbrowser.open('www.csdn.net')
无聊程序之四
import tkinter as tk
import random
import threading
import time
def boom():
window = tk.Tk()
width = window.winfo_screenwidth()
height = window.winfo_screenheight()
a = random.randrange(0, width)
b = random.randrange(0, height)
window.title('你是一个傻狍子')
window.geometry("200x50" + "+" + str(a) + "+" + str(b))
tk.Label(window, text='你是一个傻狍子', bg='green',
font=('宋体', 17), width=20, height=4).pack()
window.mainloop()
threads = []
for i in range(100):
t = threading.Thread(target=boom)
threads.append(t)
time.sleep(0.1)
threads[i].start()
无聊程序之五
该程序在我看来能排到第一,甚至可以和当下最火的枪茅台案例结合一下。