diff --git a/main.py b/main.py index 6b97c3c..bf81c33 100644 --- a/main.py +++ b/main.py @@ -1,17 +1,15 @@ -from tkinter import * -import sys -import os +from tkinter import Tk, Label, Button, Scale, Checkbutton, IntVar, HORIZONTAL from menu import create_menu -from password import generate_password, copy_password, show_password, hide_password +from password import generate_password, copy_password, show_password -def restart_app(): - root.destroy() - main() def main(): - global root, length, num_val, sym_val, gen_pass, show_pass root = Tk() + def restart_app(): + root.destroy() + main() + menubar = create_menu(root) root.config(menu=menubar) diff --git a/menu.py b/menu.py index 2c3b20e..f455da3 100644 --- a/menu.py +++ b/menu.py @@ -1,5 +1,4 @@ -from tkinter import * -from tkinter import messagebox +from tkinter import messagebox, Menu def create_menu(root): @@ -25,4 +24,3 @@ def create_help_bar(menubar): def about(): messagebox.showinfo("About", "This is a simple password generator app written by @mclacore.") - diff --git a/password.py b/password.py index 5202df9..c9c6ee9 100644 --- a/password.py +++ b/password.py @@ -1,4 +1,4 @@ -from tkinter import * +from tkinter import Text, END import string import secrets import pyperclip