The main class that hides the details of interprocess communication is called gui_client. It communicates using sockets with another class called gui_server to run the needed GUI programs on a (potentially) remote machine.
import gui_clientThe module defines the gui_client class. You have to first create an instance of gui_client and initialize its connection to a gui_server process (using defaults) :
gc = gui_client.gui_client() gc.connect()The connect method will create a new gui_server process by default if the server process doesn't exist. After this you can create the gui you want with the init('guiname') method. This method takes as first parameter a string that is the name of the gui you want to use.
ab = gc.init('ab')Now you have an A/B test GUI object instance you can use. See the documentation index below for different GUI types and their Python interfaces. If you want to add new GUI types to Guinea Pig system, please consult: How to add new user interfaces to Guinea Pig system.
All GUI objects implement the close() method to close the GUI and cleaup after themselves. You shouldn't access the object after calling close(). Here's how you close the GUI. (Note how ab is assigned to None to enable freeing the memory it uses) :
ab.close() ab = NoneYou can now initialize another GUI with the init() method. You can not currently have several GUI:s open at the same time.
You must close the connection to gui_server before you quit the program. This is done with the quit() method:
gc.quit()