From 65393492cf1dbc1b48a74f398cad902df29905e1 Mon Sep 17 00:00:00 2001 From: Eratosthenes Date: Mon, 9 Nov 2009 22:02:50 -0500 Subject: [PATCH 1/3] Get logging.conf and matplotlib datafiles. --- pyfpdb/py2exe_setup.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pyfpdb/py2exe_setup.py b/pyfpdb/py2exe_setup.py index c5f803bb..9565ac0b 100644 --- a/pyfpdb/py2exe_setup.py +++ b/pyfpdb/py2exe_setup.py @@ -66,7 +66,8 @@ setup( data_files = ['HUD_config.xml.example', 'Cards01.png', - 'logging.conf' + 'logging.conf', + (r'matplotlibdata', glob.glob(r'c:\python26\Lib\site-packages\matplotlib\mpl-data\*')) ] ) From a5b0de5ed2ea4bded0cdb9a1e7cf4a43dbe67b91 Mon Sep 17 00:00:00 2001 From: Eratosthenes Date: Wed, 11 Nov 2009 16:20:43 -0500 Subject: [PATCH 2/3] Fix problem with .example overiding HUD_config. --- pyfpdb/Configuration.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/pyfpdb/Configuration.py b/pyfpdb/Configuration.py index a8bf79a6..6712afbc 100755 --- a/pyfpdb/Configuration.py +++ b/pyfpdb/Configuration.py @@ -402,7 +402,7 @@ class Config: sys.stderr.write("Configuration file %s not found. Using defaults." % (file)) file = None - file = get_config("HUD_config.xml") + if file is None: file = get_config("HUD_config.xml") # Parse even if there was no real config file found and we are using the example # If using the example, we'll edit it later @@ -945,3 +945,7 @@ if __name__== "__main__": print c.get_game_parameters(game) print "start up path = ", c.execution_path("") + +from xml.dom.ext import PrettyPrint +for site_node in c.doc.getElementsByTagName("site"): + PrettyPrint(site_node, stream=sys.stdout, encoding="utf-8") From 85f488e9cb800960bfa4a87ed18cd5bb94397829 Mon Sep 17 00:00:00 2001 From: Eratosthenes Date: Wed, 11 Nov 2009 16:25:31 -0500 Subject: [PATCH 3/3] Fix pretty print test. --- pyfpdb/Configuration.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pyfpdb/Configuration.py b/pyfpdb/Configuration.py index 6712afbc..3f183204 100755 --- a/pyfpdb/Configuration.py +++ b/pyfpdb/Configuration.py @@ -946,6 +946,6 @@ if __name__== "__main__": print "start up path = ", c.execution_path("") -from xml.dom.ext import PrettyPrint -for site_node in c.doc.getElementsByTagName("site"): - PrettyPrint(site_node, stream=sys.stdout, encoding="utf-8") + from xml.dom.ext import PrettyPrint + for site_node in c.doc.getElementsByTagName("site"): + PrettyPrint(site_node, stream=sys.stdout, encoding="utf-8")