【发布时间】:2016-05-15 19:33:04
【问题描述】:
我在长时间使用 wxPython 和动画 (gif) 飞溅时苦苦挣扎。到目前为止,我有:
class Splash(wx.SplashScreen):
def __init__(self, parent=None, id=-1):
image = "spinner.gif"
aBitmap = wx.Image(name =image).ConvertToBitmap()
splashStyle = wx.SPLASH_CENTRE_ON_PARENT
splashDuration = 0 # milliseconds
wx.SplashScreen.__init__(self, aBitmap, splashStyle,
splashDuration, parent)
gif = wx.animate.GIFAnimationCtrl(self, id, image,)
self.Show()
self.gif = gif
def Run(self,):
self.gif.Play()
我想做这样的事情:
splash = Splash()
splash.Run()
result = very_time_consuming_function()
splash.Close()
...
use the result
任何意见将不胜感激
【问题讨论】:
标签: python wxpython animated-gif splash-screen