##########################-------------------main-------------########### root = Tk() gv = GlobalVariables() bg = Bigraph() s = 50 x = 200 y = 200 r1 = 110 #radius of center circle max_r2 = 80 #gv._circleList = [] stack = [] gv._canvas = Canvas(root,height=400,width=400,bg='yellow') gv._canvas.grid(row=2,column=1) #gv._canvas.focus_set() gv._txtBox = Text(root,width=50,height=1,padx=5,pady=5,insertofftime=250,takefocus=1) gv._txtBox.grid(row=1,column=1) gv._txtBox.focus() #gv._txtBox.insert(INSERT,"hello") #print "hilite", gv._highlighted #print "num steps:", gv._ttlNumSteps gv._currProbs = bg._prior set_layout() draw_interface(x,y,r1,max_r2) #testing
################------------------python main---------------######## root = Tk() gv = GlobalVariables() bg = Bigraph() #bg._print(bg._bigrph1) #bg._print(bg._bigrph2) stack = Stack() canvHeight = 400 canvWidth = 800 gv._canHt = canvHeight gv._canWdth = canvWidth txtBxWidth = canvWidth / 8 txtBxHeight = 1 gv._canvas = Canvas(root,height=canvHeight,width=canvWidth,bg='yellow') gv._canvas.grid(row=2,column=1) gv._txtBox = Text(root,width=txtBxWidth,height=txtBxHeight,padx=5,pady=5,insertofftime=250,takefocus=1) gv._txtBox.grid(row=1,column=1) gv._txtBox.focus() start() #testing #test_interface() root.mainloop()
gv._box2 = alphabet[(len(alphabet)/2)+1:len(alphabet)] draw_interface(gv._canHt, gv._canWdth) ##################################-------------------main---------------################################ root = Tk() #new window root.config(width=300,height=500) gv = GlobalVariables() #never a good idea but considering time constraint... bg = Bigraph() tg = Trigraph() wd = Words() stack = Stack() canvHeight = 600 canvWidth = 1200 gv._canHt = canvHeight gv._canWdth = canvWidth txtBxWidth = canvWidth / 26 txtBxHeight = 1 gv._canvas = Canvas(root,height=canvHeight,width=canvWidth,bg=gv._canColor) gv._canvas.create_window(100,100) gv._canvas.grid(row=2,column=1) gv._txtBox = Text(root,width=txtBxWidth,height=txtBxHeight,padx=5,pady=5,insertofftime=250,takefocus=1, font='Courier 32 bold') gv._txtBox.grid(row=1,column=1) gv._txtBox.focus() start() #test_interface() root.mainloop()