import papi, atexit # Create the main application object, set a descriptive name for it and # a more detailled description, which tells the user what the object # represents. application = papi.AtkObject () application.name = "Sample Application" application.description = "A description for the Sample Application" # Set the role of the object so the user and AT-sytems can easily # determine what it stands for. application.role = papi.ATK_ROLE_APPLICATION # Set the application object as root object for the whole application. papi.set_atk_root (application) # Register the shutdown method, so anything will be cleaned up nicely # and all event hooks (and CORBA bindings) will be terminated once the # application is closed. atexit.register (papi.shutdown) # Initialize the ATK-system. papi.init () print "Press CTRL-C to exit the application." while True: # Let the application interact with its enviroment. papi.iterate ()