小编mvi*_*mes的帖子

双分号在c中意味着什么?

例如:

void thisIsAnExample(Hello* bye, char* name, int num, in* arr, int* sum){
                 GoodBye x;;
                   x.funName = name;
                    .
                    .
                    .
Run Code Online (Sandbox Code Playgroud)

c struct pointers

6
推荐指数
2
解决办法
7117
查看次数

Python Tkinter动画

为什么动画不起作用?运行程序时,形状不会移动.

from Tkinter import *
import time



class alien(object):
     def __init__(self):
        self.root = Tk()
        self.canvas = Canvas(self.root, width=400, height = 400)
        self.canvas.pack()
        alien1 = self.canvas.create_oval(20, 260, 120, 360, outline='white',         fill='blue')
        alien2 = self.canvas.create_oval(2, 2, 40, 40, outline='white', fill='red')
        self.canvas.pack()
        self.root.mainloop()

     def animation(self):
        track = 0
        while True:
        x = 5
        y = 0
        if track == 0:
           for i in range(0,51):
                self.time.sleep(0.025)
                self.canvas.move(alien1, x, y)
                self.canvas.move(alien2, x, y)
                self.canvas.update()
           track = 1
           print "check"

        else:
           for i in range(0,51):
                self.time.sleep(0.025) …
Run Code Online (Sandbox Code Playgroud)

python animation tkinter python-2.7

3
推荐指数
2
解决办法
3万
查看次数

标签 统计

animation ×1

c ×1

pointers ×1

python ×1

python-2.7 ×1

struct ×1

tkinter ×1