#!/usr/bin/python ''' handle gui button related commands.''' import ri_tk as display import ri_seq import ri_widget def quit(): ''' correspond to quit button ''' display.quit() def previous(): ''' correspond to previous button ''' wid_name = ri_seq.previous() if wid_name is not None: if ri_widget.Widget.current_widget: ri_widget.Widget.current_widget.hide() ri_widget.Widget.dict[wid_name].show() else: ri_widget.MessageBox.dict["previous"].show() def next(): ''' correspond to next button ''' wid_name = ri_seq.next() if wid_name is not None: if ri_widget.Widget.current_widget: ri_widget.Widget.current_widget.hide() ri_widget.Widget.dict[wid_name].show() else: ri_widget.MessageBox.dict["next"].show() def serial_no_init(): display.var_dict['serial_no.number'].set(value='123') def serial_no_quit(): v = display.var_dict['serial_no.number'].get()