Search
 
SCRIPT & CODE EXAMPLE
 

PYTHON

password manager python

from tkinter import *
import string
from random import randint, choice

def generate_password():
    password_min = 8
    password_max = 8
    all_chars = string.ascii_letters + string.punctuation + string.digits
    password = "".join(choice(all_chars) for x in range (randint(password_min, password_max)))
    password_entry.delete(0, END)
    password_entry.insert(0, password)

def generate_password2():
    password_min = 8
    password_max = 8
    all_chars = string.ascii_letters
    password = "".join(choice(all_chars) for x in range (randint(password_min, password_max)))
    password_entry.delete(0, END)
    password_entry.insert(0, password)

def generate_password3():
    password_min = 8
    password_max = 8
    all_chars = string.ascii_letters + string.digits
    password = "".join(choice(all_chars) for x in range (randint(password_min, password_max)))
    password_entry.delete(0, END)
    password_entry.insert(0, password)



window = Tk()
window.title("Password Generator")
window.geometry("1920x1080")
window.minsize(1000, 600)
window.wm_attributes("-topmost", 1)
window.configure(bg = '#4065A4')

frame = Frame(window, bg='#4065A4')



salut = Label(frame, text="Your generated password will be showed here:", font=("Helvetica", 20), bg='#4065A4', fg='white')
salut.pack()

password_entry = Entry(frame, text="Mot de passe", font=("Helvetica", 20), bg='#4065A4', fg='white')
password_entry.pack()

Moche = Label(frame, text="Press the button below to generate a password with letters, punctuations and special characters", font=("Helvetica", 20), bg='#4065A4', fg='white')
Moche.pack()

button = Button(frame, text="Generate", font=("Helvetica", 20), bg='#4065A4', fg='red', command=generate_password)
button.pack(fill=X)

Moche = Label(frame, text="Press the button below to generate a password with only letters", font=("Helvetica", 20), bg='#4065A4', fg='white')
Moche.pack()

button = Button(frame, text="Generate", font=("Helvetica", 20), bg='#4065A4', fg='red', command=generate_password2)
button.pack(fill=X)

Moche = Label(frame, text="Press the button below to generate a password with letters and numbers", font=("Helvetica", 20), bg='#4065A4', fg='white')
Moche.pack()

button = Button(frame, text="Generate", font=("Helvetica", 20), bg='#4065A4', fg='red', command=generate_password3)
button.pack(fill=X)

Moche = Label(frame, text="", font=("Helvetica", 20), bg='#4065A4', fg='white')
Moche.pack()

Moche = Label(frame, text="Password generator made by Luca.", font=("Helvetica", 20), bg='#4065A4', fg='white')
Moche.pack()

frame.pack(expand=YES)


window.mainloop()
Comment

PREVIOUS NEXT
Code Example
Python :: charcodeat python 
Python :: python one line if else 
Python :: count number of zeros in a number python 
Python :: Python DateTime add days to DateTime object 
Python :: making a function wait in python 
Python :: how to get something from a certian possition in a list python 
Python :: python match phone number 
Python :: save dictionary to file numpy 
Python :: create virtual env 
Python :: pynput.keyboard.Key 
Python :: palindrome rearranging python 
Python :: how to check if email exists in python 
Python :: how to count special values in data in python 
Python :: remove special characters from string python 
Python :: how to round a number down in python 
Python :: how to create a countdown timer using python 
Python :: how to add color to python text 
Python :: Read XML file to Pandas DataFrame 
Python :: convert pdf folder to excell pandas 
Python :: python big comment 
Python :: python input lowercase 
Python :: save and load a machine learning model using Pickle 
Python :: python ascii 
Python :: numpy datetime64 get day 
Python :: calculating mean for pandas column 
Python :: random id python 
Python :: create age-groups in pandas 
Python :: isnumeric python 
Python :: how to check if given number is binary in pytho 
Python :: pandas sort by date descending 
ADD CONTENT
Topic
Content
Source link
Name
1+8 =