Esempio n. 1
0
from Recipe import Recipe
import numpy as np

#Load test recipe:
tester = Recipe()
tester.load("Maverick.txt")
tester.printRecipe()
        self.actLabel = tk.Label(self, text="Actual ABV (%):")
        self.actLabel.grid(row=6, column=2)
        self.actEntry = tk.Entry(self, width=15, justify='center')
        self.actEntry.insert(0, recipe.getABV())
        self.actEntry.config(state='readonly')
        self.actEntry.grid(row=6, column=3)

        #Ingredients Widgets
        self.ingLabel = tk.Label(self, text="Ingredients:")
        self.ingLabel.grid(row=7, column=0)
        t = recipe.getIngredientList()
        self.ingEntry = tk.Text(self, width=50, height=len(t) + 1)
        for x in t:
            self.ingEntry.insert(tk.END, x + "\n")
        self.ingEntry.config(state='disabled')
        self.ingEntry.grid(row=7, column=1)

        #Note Widgets
        self.noteLabel = tk.Label(self, text="Notes:")
        self.noteLabel.grid(row=8, column=0)
        self.noteEntry = tk.Text(self, width=50, height=5)
        self.noteEntry.insert(0.0, recipe.getTasteNotes())
        self.noteEntry.config(state='disabled')
        self.noteEntry.grid(row=8, column=1)


test = Recipe()
test.load("./Recipes/BrewDevil.txt")
app = RecipeDisplay(test)
app.mainloop()