本文整理汇总了Python中Matrix.host方法的典型用法代码示例。如果您正苦于以下问题:Python Matrix.host方法的具体用法?Python Matrix.host怎么用?Python Matrix.host使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Matrix
的用法示例。
在下文中一共展示了Matrix.host方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: callback
# 需要导入模块: import Matrix [as 别名]
# 或者: from Matrix import host [as 别名]
def callback():
output_file = open("host.txt", "w")
color = ["Blue","Green","Orange","Red"][var.get()]
difficulty = ["easy", "average", "hard"][diff.get()]
new_host = Matrix.host(color, difficulty)
output_file.write(str(new_host.color) +" " + str(new_host.security_value) + " - ")
output_file.write(str(new_host.subsystems["Access"]) + "/" + str(new_host.subsystems["Control"]) + "/")
output_file.write(str(new_host.subsystems["Index"]) + "/" + str(new_host.subsystems["Files"]) + "/")
output_file.write(str(new_host.subsystems["Slave"]) + "\n\n\n")
for line in new_host.sheaf:
output_file.write(line + "\n")
output_file.write('\n\nPaydata Points\n')
for point in new_host.paydata:
output_file.write("> " + str(point[0]) + " Mp -- " + str(point[1]) + "\n")