Showing message on status bar
use as a status bar. So, I modify this recipe and
make it into a module. (need fgimage.pyd from here)
# status.py from graphics import * import fgimage __all__ = ["status_on", "status_off"] bar = Image.new((119,13)) bgcolor = screenshot().getpixel((0,0))[0] fg = fgimage.FGImage() def status_on(message=None): if message is not None: bar.clear(bgcolor) bar.text((0,11), unicode(message), 0xffffff) fg.set(57,30, bar._bitmapapi()) def status_off(): fg.unset()
You can use it easily this way
>>> from status import * >>> status_on('Hello world') # show it >>> status_off() # hide it >>>
See a screenshot.