what is the purpose of of this line "makemodal = (len(sys.argv) > 1)" in this script:
#!/usr/bin/env python
import sys
from Tkinter import *
makemodal = (len(sys.argv) > 1)
class Yoli(Frame):
def __init__(self, master):
Frame.__init__(self, master)
self.grid()
self.createwidgets()
def loveyoli(self):
win = Toplevel()
Label(win, text='I love you Yoli').pack()
if makemodal:
win.focus_set()
win.grab_set()
win.wait_window()
#print 'dialog exit'
def callloveyoli(self):
i = 0
j = 10
while i <j:
self.loveyoli()
i = i+1
def createwidgets(self):
self.numb_lbl = Label(text = "Enter a number")
self.numb_lbl.grid(row = 0, column = 0,
columnspan = 2, sticky = W)
Button(root, text='A screet',
command=self.callloveyoli).grid(row=4, column = 0,
sticky = W)
root = Tk()
root.title('A message for Yoli')
app = Yoli(root)
root.mainloop()