Secondary development. Self-directed learning. g --- I'm thinking of making something like Authenticator with python I made it for the time being. This is also the first time
Next, instead of putting the key or username directly in the source I will prepare it to have a systematic feel.
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import tkinter as tk
import pyotp
totp = pyotp.TOTP('ZAQWSXCDERFVBGT') #Key value
totp.now()
#Create window and title with tkinter
#Specify window size
root = tk.Tk()
root.title(u"g_authentication_tool")
root.geometry("300x200")
#Label for display
Static1 = tk.Label(text=u'user1')
Static1.pack(side='left')
Static2 = tk.Label(text=totp.now())
Static2.pack(side='left')
root.mainloop()
Recommended Posts