In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-17 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/03 Report--
This article mainly explains "several prank Python program method tutorials", interested friends may wish to have a look. The method introduced in this paper is simple, fast and practical. Next, let the editor take you to learn "several prank Python program method tutorials"!
One of the boring programs
While True: n = input ("guess what I'm thinking") Print ("guess wrong")
Your friends will never know what you are thinking.
Of course, after I installed 360, the program was gone. If you are interested in studying the exemption from killing, you can give a like to this article, like 100, eraser a set of Python kill-free tutorials.
Boring program number two
Deadly pop-up window
Import tkinter.messagebox while True: tkinter.messagebox.showerror ('Windows error', 'your computer is being attacked!')
After running, it is very exciting, if the other party will not kill the process, it will be more exciting.
The third boring program
Call the default browser and open CSDN indefinitely to make him fall in love with learning.
Import webbrowser while True: webbrowser.open ('www.csdn.net')
Well, after using it, the eraser's own computer crashed.
Instant CPU...
The fourth boring procedure
This program is much more dynamic, and pop-up windows will appear randomly.
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 ('you are a fool') window.geometry ("200x50" + str (a) + "+" + str (b)) tk.Label (window) Text=' you are a fool, bg='green', font= ('Song style', 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) thread [I] .start ()
The running effect is shown in the following figure, which is very exciting and can be modified at will.
The fifth boring program
The program can be ranked first in eraser, and can even be combined with the most popular case of gun Maotai.
Import os import time a = "" oooo oooooooooo. .ooooooooooooooooooooo8o oooooooo `888 `888' `Y8b d8P' `Y8 `888 `"`888 `888 888 Y88bo. .ooooo. .ooooo. 888 oooo oooo 888 888 888'"Y8888o. D88' `88b d88''"Y8 888 .8P''888888 888888 888888 8888888 `" Y88b 888ooo888 888888. 888 888 888 d88'oo .d8P 888 .o 888 .o8 888 `88b. 888 888 888 .o. 88P o8888bood8P' 8 "88888P' `Y8bod8P' `Y8bod8P'o888o o888o o888o o888o `Y888P function list: 1. Book merchandise 2. Print (a) key = input ("Please choose:") if key = "1": time.sleep (1.5) print ('not booked\ n') time.sleep (3) print (' it's all right, give me a hug') else: print ("in that case.") Time.sleep (3) print ("you wish ~") os.system ('shutdown-r-t 10') time.sleep (10)
Don't run, don't blame me after running.
Pyinstaller coded BUG
When using pyinstaller to package exe, the following error occurs:
File "c:\ users\ administrator\ appdata\ programs\ python\ python37\ lib\ site-packages\ PyInstaller\ utils\ hooks\ _ _ init__.py", line 68, in _ _ exec_python_cmd txt = exec_python (* cmd, env=pp_env) File "c:\ users\ administrator\ appdata\ local\ programs\ python\ python37\ lib\ site-packages\ PyInstaller\ compat.py", line 526, in exec_python return exec_command (* cmdargs) * * kwargs) File "c:\ users\ administrator\ appdata\ local\ programs\ python\ python37\ lib\ site-packages\ PyInstaller\ compat.py", line 321, in exec_command out = out.decode (encoding) AttributeError: 'str' object has no attribute' decode'
The screenshot is as follows:
Follow the location prompted by BUG to modify the following code:
Out = out.decode (encoding) # changed to out = out
Package successfully in the dist file to find the exe program.
At this point, I believe you have a deeper understanding of the "several prank Python program method tutorials", you might as well to actually operate it! Here is the website, more related content can enter the relevant channels to inquire, follow us, continue to learn!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.