2 #We only need the core here, which speeds up the import. As we want to show the splashscreen ASAP.
5 def getBitmapImage(filename):
6 #The frozen executable has the script files in a zip, so we need to exit another level to get to our images.
7 if hasattr(sys, 'frozen'):
8 return wx.Bitmap(os.path.normpath(os.path.join(os.path.split(__file__)[0], "../../images", filename)))
10 return wx.Bitmap(os.path.normpath(os.path.join(os.path.split(__file__)[0], "../images", filename)))
12 class splashScreen(wx.SplashScreen):
13 def __init__(self, callback):
14 self.callback = callback
15 bitmap = getBitmapImage("splash.png")
16 super(splashScreen, self).__init__(bitmap, wx.SPLASH_CENTRE_ON_SCREEN, 0, None)
17 wx.CallAfter(self.DoCallback)
23 def showSplash(callback):
25 splashScreen(callback)
28 def testCallback(splashscreen):
35 showSplash(testCallback)
37 if __name__ == u'__main__':