pygo/pygo.py

40 lines
622 B
Python
Executable File

#!/usr/bin/python
# -*- coding: utf-8 -*-
#
# A GTK Python GO client
import sys
sys.path.append('lib/')
import ConfigParser
import goban
import pygogui
def main():
# Read config file
settings = read_config_file()
# Data
gb = goban.Goban()
gui = pygogui.GUI(gb, settings)
gui.update()
while True:
# All of the real work happens in pygogui
# It keeps a copy of all the relevant data
gui.do_event()
gui.update()
def read_config_file():
ret = ConfigParser.ConfigParser()
ret.read('pygo.cfg')
return ret
if __name__ == '__main__': main()