本文实例为大家分享了python tkinter实现屏保程序的具体代码,供大家参考,具体内容如下
该脚本摘录自:2014年辛星tkinter教程第二版
#!/usr/bin/env python
from Tkinter import *
from random import randint
class RandomBall(object):
def __init__(self, canvas, screenwidth, screenheight):
self.canvas = canvas
self.xpos = randint(10, int(screenwidth)