Output with GUI
Simple output using Tkinter for the GUI.
This commit is contained in:
parent
3ec73d22c0
commit
50e75be7e8
@ -8,7 +8,7 @@ be user friendly and encourage the adoption of strong random passwords.
|
||||
Instructions on how to install from the git repository for developers.
|
||||
|
||||
* Clone the repository: `git clone https://github.com/Kris619/Dicekey.git`
|
||||
* Install checkinstall: `sudo apt-get install checkinstall`
|
||||
* Install dependencies: `sudo apt-get install python-tk checkinstall`
|
||||
* Install Dicekey with GNU make: `make install`
|
||||
* Clean up files: `make clean`
|
||||
|
||||
|
@ -15,17 +15,35 @@
|
||||
|
||||
# Built-in
|
||||
import sys
|
||||
import Tkinter as tk
|
||||
|
||||
# Local
|
||||
import diceware
|
||||
|
||||
|
||||
def main():
|
||||
print "Here are some random Diceware numbers for you!"
|
||||
for number in diceware.numgen(7):
|
||||
print number
|
||||
class GUI:
|
||||
|
||||
raw_input()
|
||||
def __init__(self, master):
|
||||
|
||||
frame = tk.Frame(master, padx=50, pady=50)
|
||||
frame.pack()
|
||||
|
||||
msgtxt = "Here are some random Diceware numbers for you!"
|
||||
msg = tk.Label(frame, pady=15, font=("Arial", 16), text=msgtxt)
|
||||
msg.pack()
|
||||
|
||||
for number in diceware.numgen(7):
|
||||
text = tk.Label(frame, font=("FreeMono", 16), text=number)
|
||||
text.pack()
|
||||
|
||||
|
||||
def main():
|
||||
|
||||
root = tk.Tk()
|
||||
root.wm_title("Dicekey – Password Generator")
|
||||
interface = GUI(root)
|
||||
|
||||
root.mainloop()
|
||||
sys.exit(0)
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user