Information
We are currently investigating an issue with the editor of some pages. Please save your work and avoid to create new pages until this banner is gone.
...
Code Block | ||||||
---|---|---|---|---|---|---|
| ||||||
#!/usr/bin/env python from time import sleep import FRIDGE from Acspy.Nc.Consumer import Consumer #------------------------------------------------------------------------------ def fridgeDataHandler(some_param): tempDiff = some_param.absoluteDiff print 'The temperature difference is', tempDiff return #------------------------------------------------------------------------------ g = Consumer(FRIDGE.CHANNELNAME_FRIDGE) g.addSubscription(FRIDGE.temperatureDataBlockEvent, fridgeDataHandler) g.consumerReady() sleep(50) g.disconnect() #--------------------------------------------------------------------------- |
...