The SardanaInfoViewer subscribes to Info events of a door and displays the text in a widget. Any macro may send strings to the info stream:
#!/bin/env python
#
# file name: /home/pXXuser/sardanaMacros/hello_world.py
#
"""this module contains the hello world macro"""
__all__ = ["hello_world"]
from sardana.macroserver.macro import *
from sardana.macroserver.macro import macro
import HasyUtils
import random
class hello_world(Macro):
"""The hello world macro."""
def run(self):
self.output( "Hello World!")
self.output( "dir( self) %s" % str( dir( self)))
self.info( "info: this is a message from hello_world")
self.warning( "warning: this is an warning message from hello_world")
self.error( "error: this is an error message from hello_world")
The InfoViewer server can be launched from a Unix shell or from spock
p10user@haspp10e2:~/temp$ SardanaInfoViewer3.py & p10/door/haspp10e2.01 [2]: ! SardanaInfoViewer3.py &