pygo/pygo.py

40 lines
622 B
Python
Raw Normal View History

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