Tik-76.115 Individual Project: Guinea Pig
$Id: abc_python_interface.html,v 1.3 1996/04/22 08:16:04 kepa Exp $

Testee UI - A/B/C Test Python interface

This document describes the Python interface of A/B/C Test. It is used to interface the A/B/C Test Logic module to A/B/C Test Testee UI. See the A/B/C Test User Manual for a general overview. Here's a snapshot of the A/B/C Test GUI:

[Image]

Using abc_gui class

You can use the gui_client class init('abc') method call to create an abc_gui class GUI instance. See Testee UI Python interfaces for more information.

When you have made an abc_gui class instance abc, you can use the arm() method to put the GUI in idle state and configure it. The values min, max, start, tick, correspond to: the minimum value of the slider, the maximum value of the slider, the beginning value of the slider, and the tick spacing uder the slider (use 0 for no ticks). They can be specified independently for both samples.

   abc.arm(bmin=1, bmax=5, bstart=1, btick=0,
   cmin=1, cmax=5, cstart=1, ctick=0)
With the enable() method call you enable the testee to give his/her answer. to give an answer.
   abc.enable()
You can receive the testee responses with the get_event() method. It returns a tuple that contains three values: a string, a list and a float. The first string is the type of the testee event. It can be either a BUTTON or an ANSWER. The gui will send any number of BUTTON events followed by a single ANSWER event.

The list contains the event parameters. In a button event this list will contain one string, which is the button the testee pressed ('A', 'B', 'C' or 'STOP'). In the case of an answer event, the list will contain two strings which are the integer scales given to the B and C samples respectively.

The float returned is the system clock time at the time of the answer was given (as returned by the python time.time() method).

   type, params, timestamp = abc.get_event()
When the test is over, the GUI is closed with the close() method. You should not access the object after calling this method.
   abc.close()
   abc = None


. Testee UI Python interfaces · Testee UI Architecture · Testee UI Index · Document index · Guinea Pig ·