add gui stuff to test, stop crash if xml.dom.ext not present

This commit is contained in:
sqlcoder 2009-11-28 21:11:52 +00:00
parent 7f40d9dd3a
commit cce1545024

View File

@ -960,8 +960,14 @@ if __name__== "__main__":
for game in c.get_supported_games():
print c.get_game_parameters(game)
for hud_param, value in c.get_hud_ui_parameters().iteritems():
print "hud param %s = %s" % (hud_param, value)
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")
try:
from xml.dom.ext import PrettyPrint
for site_node in c.doc.getElementsByTagName("site"):
PrettyPrint(site_node, stream=sys.stdout, encoding="utf-8")
except:
print "xml.dom.ext needs PyXML to be installed!"