Hi all,
I'm planning an experiment where the test subject is inside a chamber wearing VR-Glasses, on which the Vizard-Window is shown.
For the experimenter outside, I want to create a GUI using Tkinter that allows to control the various events happening during the experiment.
However, when I try to run my script, either the vizard-window is not opening until I close the Tkinter-GUI (if I create the GUI first), or the vizard-window opens but stops showing the splash-screen until I close the GUI (if I create the vizard-window first). A simplified code example is attached.
Does anybody have an idea how to solve this?
Code:
import viz
from Tkinter import *
viz.go()
track=viz.add('track.wrl')
class VizardApp:
def __init__(self, master=None):
self.varsp1=IntVar()
self.varsp2=IntVar()
Label(master, text="Audio Controls").grid(row=0)
Label(master, text=" ").grid(row=1)
Checkbutton(master, text="Playback 1 ON", variable=self.varsp1, command=self.prvar2).grid(row=2)
Checkbutton(master, text="Playback 2 ON", variable=self.varsp2, command=self.prvar2).grid(row=3)
Button(master, text="Quit", command=master.quit).grid(row=8, column=2)
def prvar1(self):
print "var1 is", self.varsp1.get(), "var2 is", self.varsp2.get()
def prvar2(self):
print "var2 is", self.varsp2.get(), "var1 is", self.varsp1.get()
root=Tk()
app=VizardApp(root)
root.mainloop()