Here are the GUI classes. (Internal arrows show normal method calling direction) :
The ab class is one GUI type. The different type GUI modules and classes are named after their type (ab, ab_scale, vol etc.). This class inherits from classes gui and guineawin. It implements the GUI type specific behaviour of the Testee UI.
The gui class is responsible for parsing command line arguments and opening communication socket as specified by the arguments. It also handles socket closing.
The guinewin class contains graphics intialization and communication routines common for all GUI types. It uses the callback class to implement the low-level communication and timeout handling chores.
You can copy the stub routines directly from old tests. The module abx_gui.py contains all the routines you need. You have to only change in this file the class name to newtype_gui and the started test type to newtype.
To implement the real gui process module newtype.py you have to do a little bit more. Now you should know the basics of Python and Tkinter programming. You can check the modules ab.py, ab_scale.py, abc.py and abx.py. All of this is 95% normal Tkinter programming. You can send events to the test logic with send_event method. Here is how you send the BUTTON B pressing event to the test logic:
self.send_event('BUTTON B', time.time())
When the test subject gives his/her answer, you can use the send_answer method. You must only send one answer message as an to enable message.
self.send_answer('X', time.time())
If you need more complicated message handling, you must modify the mainCB message handling routine and the stub routines also. For a good example on how to do this, see the abc.py and abc_gui.py modules.
Last, but vital part is to make sure the $PYTHONPATH environment variable contains the directory in which your new GUI modules are. Otherwise they won't start. See the module gui_test.py for an example how to test the new GUI modules.