![]() Label(win, text = 'PASSWORD GENERATOR', font ='ariel 15 bold',bg="#ffc252").pack() Here we use the Pack() function to arrange the widgets in the window. win = Tk()Īt the top of the window, the text is placed saying PASSWORD GENERATOR in bold letters with ariel font and font size 18 and with some background color. Here using configure method I set the background color of the window. Here we set it to “PASSWORD GENERATOR” with height as 500 and width as 500. and using the title function we will pass the title of the window. Using the geometry function we will set the width and height of the window. First, we initialize the win variable with Tk() function. Our next step is to initialize the window where we generate the password by giving the number of digits in the password. So to import everything that has in that particular module we use *. To install pyperclip pip install pyperclip I basically use jupyter notebook to run the code so I open the anaconda prompt and run these commands to install the libraries. For installing these libraries you have to use pip install to install them. If these libraries are not preinstalled, then you have to install them and then you have to import them. For our application, we will import Tkinter, Pyperclip, Random, and strings. Implementationįor any project, we have to start by importing the required modules. Now let us move into the implementation part. Strings: The string module in python helps in creating and customizing strings. This random module generates the random numbers. Random: Passwords are generated randomly so to generate these passwords randomly we use the random module. So in our application after generating the password we will also have an option to copy the password. Pyperclip: Pyperclip is a module in python that is used for copying and pasting the text. In this application, we use Tkinter to build the window where we generate a random password. using Tkinter is one of the easiest ways to build any GUI-based applications. Tkinter: Tkinter is a Graphical User Interface library. Python: Python is the programming language that we will use to build the application. Let us see the requirements that are needed for us to build this application. Now we will build this application using python, Tkinter, and pyperclip. Setting strong passwords is very important to avoid any attack by attackers and to keep our information safe. Nowadays we are using many applications and websites that require passwords. Password generate is a python application that will generate the random string of the desired length. In this article, we will see how to build the password generator. This article was published as a part of the Data Science Blogathon.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |