global results
    global index
    index += 1
    if len(w.inputSearchTitle.get()) > 0:
        if index >= 0 and index < len(results):
            w.outputNotice.delete(1.0, END)
            w.outputNotice.insert(1.0, results[index][2])

    else:
        w.errorOutput.configure(text="Please fill the search field. ")


def init(top, gui, *args, **kwargs):
    global w, top_level, root
    w = gui
    top_level = top
    root = top


def destroy_window():
    # Function which closes the window.
    global top_level
    top_level.destroy()
    top_level = None


if __name__ == "__main__":
    import notepad

    notepad.vp_start_gui()
Example #2
0
def next_button(p1):
    global results
    global index
    index += 1
    if (len(w.inputSearchTitle.get()) > 0):
        if (index >= 0 and index < len(results)):
            w.outputNotice.delete(1.0,END)
            w.outputNotice.insert(1.0,results[index][2])
            
    else:
        w.errorOutput.configure(text="Please fill the search field. ")

def init(top, gui, *args, **kwargs):
    global w, top_level, root
    w = gui
    top_level = top
    root = top

def destroy_window():
    # Function which closes the window.
    global top_level
    top_level.destroy()
    top_level = None

if __name__ == '__main__':
    import notepad
    notepad.vp_start_gui()