Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- from random import choice
- from tkinter import *
- sy = ["A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K","L", "M", "N", "O", "P", "Q", "R", "S", "T" ,"U", "V","W", "X", "Y","Z",
- "a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k","l", "m", "n", "o", "p", "q", "r", "s", "t" ,"u", "v","w", "x", "y","z",
- "1" , "2","3" ,"4" ,"5" ,"6" ,"7","8" ,"9" ,"0","."]
- root = Tk()
- root.title("Simple Password Generator")
- root.geometry("400x300")
- def Generate(event):
- print(''.join(choice(sy) for i in range(10)))
- btn = Button(root,
- text="Generate",
- width=20,height=2,
- bg="grey",fg="black",
- font='arial 19')
- btn.bind("<Button-1>", Generate)
- btn.pack()
- btn.pack(side='top')
- root.mainloop()
- from random import choice
- from tkinter import *
- def Generate(event):
- tex.insert(END, ''.join(choice(sy) for i in range(10)) + 'n')
- sy = ["A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K","L", "M", "N", "O", "P", "Q", "R", "S", "T" ,"U", "V","W", "X", "Y","Z",
- "a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k","l", "m", "n", "o", "p", "q", "r", "s", "t" ,"u", "v","w", "x", "y","z",
- "1" , "2","3" ,"4" ,"5" ,"6" ,"7","8" ,"9" ,"0","."]
- root = Tk()
- root.title("Simple Password Generator")
- root.geometry("400x300")
- btn = Button(root,
- text="Generate",
- width=20,height=2,
- bg="grey",fg="black",
- font='arial 19')
- btn.bind("<Button-1>", Generate)
- btn.pack(side='top')
- tex = Text(root)
- scr = Scrollbar(root, command=tex.yview)
- tex.configure(yscrollcommand=scr.set, state=ENABLE)
- scr.pack(side='right', fill='y')
- tex.pack(fill='both')
- root.mainloop()
Add Comment
Please, Sign In to add comment