views:

386

answers:

3

Any ideas how I can display an image file (bmp or png) centered on the screen as an application splash screen when running a Windows console script based on a batch file, vbscript/wscript or Python console script?

I'm not interested in a wxPython solution - that's too much overhead just to implement a cosmetic feature like a splash screen.

Thank you, Malcolm

A: 

You can surely cook it up using the Win32 API and the win32api Python module.

How about this recipe? Alternatively, this article has some C code that can be converted for invocation from Python with win32api.

Eli Bendersky
+1  A: 

A low-tech, ugly approach? How about opening an image viewer with the bitmap and killing it after some time or when the initializations are done? ;-)

You certainly have no native way of doing this in a batch file. From VBScript you could use an HTA. PowerShell has no problems of doing this with Windows Forms but wasn't on your list, though.

Joey
A: 

Try TK, it is included with python. Also, PyGtk is lighter than wxPython, but I ended up bitting the bullet and using wxPython for the same purpose recently, it is heavy, but it didn't have any affect on the script performance.

mikerobi