Package butler :: Module butlerGUI :: Class ButlerGUI
[hide private]
[frames] | no frames]

Class ButlerGUI

source code

object --+
         |
        ButlerGUI

This class contains the user interface for the Butler wine diary program, which allows a single user to add evaluations of wines into the application window.

Please note that multiple users and persistent storage of data into files are not supported by this version of the program.

Instance Methods [hide private]
 
__init__(self)
Creates a new Butler user interface (i.e.
source code
 
read_wine(self)
An event handler method: reacts to the pressing of buttons by the user.
source code
 
add_new_wine(self, new_wine)
Adds a new wine evaluation to the user's wine diary and updates the GUI accordingly.
source code
 
mark_favorite_wine(self) source code

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self)
(Constructor)

source code 

Creates a new Butler user interface (i.e. a window and its contents) and makes it visible onscreen.

Overrides: object.__init__

read_wine(self)

source code 

An event handler method: reacts to the pressing of buttons by the user. In this case, if the "Add wine" button is pressed, the user is prompted for the data of the new wine diary entry, and the new wine is added for the user.

add_new_wine(self, new_wine)

source code 

Adds a new wine evaluation to the user's wine diary and updates the GUI accordingly.

Parameters:
  • new_wine - new wine object to add