本文整理汇总了Python中configuration.Configuration.modify_value_in_xml方法的典型用法代码示例。如果您正苦于以下问题:Python Configuration.modify_value_in_xml方法的具体用法?Python Configuration.modify_value_in_xml怎么用?Python Configuration.modify_value_in_xml使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类configuration.Configuration
的用法示例。
在下文中一共展示了Configuration.modify_value_in_xml方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: __init__
# 需要导入模块: from configuration import Configuration [as 别名]
# 或者: from configuration.Configuration import modify_value_in_xml [as 别名]
#.........这里部分代码省略.........
print "you press key %s" %(read_key)
elif read_key == "h":
print "You press key %s" % read_key
elif read_key == "b":
break
else:
read_key = raw_input("choose another option.")
read_key = self.start_end_menus("save")
def print_sub_menu_options(self):
read_key = self.start_end_menus("options")
while read_key != "B":
if read_key == "a":
self.print_sub_menu_algorithm()
elif read_key == "d":
self.print_sub_menu_difficulty()
elif read_key == "v":
self.print_sub_menu_solved_out_put()
elif read_key == "b":
break
else:
read_key = raw_input("choose another option.")
read_key = self.start_end_menus("options")
def print_sub_menu_algorithm(self):
read_key = self.start_end_menus("algorithm")
while read_key != "B":
if read_key == "k":
self.algorithm = "backtracking"
self.new_configuration.modify_value_in_xml(self.algorithm,"algorithm")
raw_input ("you chose " +self.algorithm + " Algorithm")
break
elif read_key == "n":
self.algorithm = "peternorvig"
self.new_configuration.modify_value_in_xml(self.algorithm,"algorithm")
raw_input ("you chose " + "Peter Norvig" + " Algorithm")
break
elif read_key == "i":
self.algorithm = "recursive"
self.new_configuration.modify_value_in_xml(self.algorithm,"algorithm")
raw_input ("you chose " +self.algorithm + " Algorithm")
break
elif read_key == "b":
break
else:
read_key = raw_input("choose another option.")
read_key = self.start_end_menus("algorithm")
def print_sub_menu_difficulty(self):
read_key = self.start_end_menus("difficulty")
difficulty_matrix = self.new_menus.get_difficulty_matrix()
while read_key != "B":
if read_key == "e":
self.print_sub_menu_edit()
try:
if read_key == "e":
self.print_sub_menu_edit()
elif read_key == "0":
self.difficulty = difficulty_matrix[0][1]
self.new_configuration.modify_value_in_xml(self.difficulty,"difficulty")