您将如何绘制代码?

时间:2019-05-19 15:58:53

标签: python-2.7

使用tkinter,您将如何绘制代码?

def draw(x, y, code):
   for i in range(8):
      if code[i] != "0":
        canvas.create_line(x+i*10, y, x+i*10, y+80, width = int(code[i]), fill = "black")
      canvas.create_rectangle(x+5, y+65,x+65, y+80, fill = "white", outline = "white")
      canvas.create_text(x+35, y+75, text = code)

0 个答案:

没有答案