Changeset 110
- Timestamp:
- 04/12/08 23:00:39 (5 months ago)
- Files:
-
- sucrose/trunk/python/keypad_tk.py (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
sucrose/trunk/python/keypad_tk.py
r107 r110 35 35 36 36 self.window = Tkinter.Tk() 37 self.window.title('Sucrose') 37 38 self.window.geometry('800x600+0+0') 38 39 self.window.resizable(False, False) … … 151 152 font=("helvetica", 24), bg='white') 152 153 val_label.grid(row=row + 1, column=1, sticky=Tkinter.EW) 153 154 154 155 setattr(self, attr, val_label) 155 156 156 # self.config(width=self.parent.157 158 157 class Keypad(Tkinter.Frame): 159 158 def update(self, tray): 160 159 self.tray = tray 160 # If it's not a valid purchase, don't allow the user to press 161 # the vend button 161 162 if not tray: 162 163 self.item = None … … 187 188 tray = self.sucrose.tray_from_location(self.item_location) 188 189 189 # If it's not a valid purchase, don't allow the user to press 190 # the vend button 191 except Exception, e: 190 except ValueError, e: 191 self.location.config(text=self.item_location) 192 self.name.config(text=str(e), fg='red') 193 tray = None 194 except: 195 import traceback; traceback.print_exc() 192 196 self.location.config(text=self.item_location) 193 197 self.name.config(text=str(e), fg='red')
