Output with GUI

Simple output using Tkinter for the GUI.
This commit is contained in:
Kris Lamoureux 2016-05-19 03:52:09 -04:00
parent 3ec73d22c0
commit 50e75be7e8
Signed by: kris
GPG Key ID: 3EDA9C3441EDA925
3 changed files with 25 additions and 7 deletions

View File

@ -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. Instructions on how to install from the git repository for developers.
* Clone the repository: `git clone https://github.com/Kris619/Dicekey.git` * 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` * Install Dicekey with GNU make: `make install`
* Clean up files: `make clean` * Clean up files: `make clean`

View File

@ -15,17 +15,35 @@
# Built-in # Built-in
import sys import sys
import Tkinter as tk
# Local # Local
import diceware import diceware
def main(): class GUI:
print "Here are some random Diceware numbers for you!"
for number in diceware.numgen(7):
print number
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) sys.exit(0)

View File

@ -17,7 +17,7 @@
from distutils.core import setup from distutils.core import setup
NAME = "Dicekey" NAME = "Dicekey"
VERSION = "0.1.0-prealpha" VERSION = "0.2.0-prealpha"
AUTHOR = "Kris Lamoureux" AUTHOR = "Kris Lamoureux"
AUTHOR_EMAIL = "KrisPublicEmail@gmail.com" AUTHOR_EMAIL = "KrisPublicEmail@gmail.com"
URL = "https://github.com/Kris619/Dicekey/" URL = "https://github.com/Kris619/Dicekey/"