本文整理汇总了Python中Interpreter.generate_build_order方法的典型用法代码示例。如果您正苦于以下问题:Python Interpreter.generate_build_order方法的具体用法?Python Interpreter.generate_build_order怎么用?Python Interpreter.generate_build_order使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Interpreter
的用法示例。
在下文中一共展示了Interpreter.generate_build_order方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: Printing_Screen
# 需要导入模块: import Interpreter [as 别名]
# 或者: from Interpreter import generate_build_order [as 别名]
def Printing_Screen(self):
self.scrollbar = Scrollbar(self.frame)
self.scrollbar.grid(row=0, column=2, sticky=N+S)
self.printing_l = Text(self.frame)
self.printing_l.grid(row=0, column = 0)
self.scrollbar.config(command=self.printing_l.yview)
self.pause_b = Button(self.frame, text="Pause Printing", font=("Helvetica", 14),command= self.Pause_Screen)
self.pause_b.grid(row=1, column = 0, pady=10)
self.quit_b = Button(self.frame, text= "Quit Printing", font=("Helvetica", 14),command= self.to_quit)
self.quit_b.grid(row=2, column = 0, pady=10)
# Interpreter
self.display_message("Reading file...")
bricks = Interpreter.parsing(self.file.name)
Interpreter.translation(bricks)
self.display_message("Parsing file...")
build_order = Interpreter.generate_build_order(bricks)
self.display_message("Generating build order...")
#build_list = Interpreter.generate_build_list(build_order)
# Communication
self.display_message("Opening communication channel...")
com = Communicator()
com.setup_connection()
self.display_message("Communication established.")
self.display_message("Printing...")
bricks = com.print_bricks(build_order)
for instruction in bricks:
com.send_message(instruction[0], instruction[1])
com.close_connection()