Newer
Older
pyenergenie / src / energenie / __init__.py
# energenie.py  24/05/2016  D.J.Whale
#
# Provides the app writer with a simple single module interface to everything.
# At the moment, this just hides the fact that the radio module needs to be initialised
# at the start and cleaned up at the end.
#
# Future versions of this *might* also start receive monitor or scheduler threads.

try:
    # Python 3
    from . import radio
    from . import Devices
    from . import Registry
except ImportError:
    # Python 2
    import radio
    import Devices
    import Registry


def init():
    """Start the Energenie system running"""
    radio.init()


def finished():
    """Cleanly close the Energenie system when finished"""
    radio.finished()


# END