#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Tabletop Weather Station
Copyright (C) 2018 Olaf Lüke <olaf@tinkerforge.com>

tabletop_weather_station_demo: Tabletop Weather Station Demo startup

This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
General Public License for more details.

You should have received a copy of the GNU General Public
License along with this program; if not, write to the
Free Software Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA.
"""

# this is the main script, if this demo was installed using "setup.py install"

import sys
if (sys.hexversion & 0xFF000000) != 0x03000000:
    print('Python 3.x required')
    sys.exit(1)

try:
    from tabletop_weather_station_demo.main import main

    if __name__ == "__main__":
        main(packaged=True)
except ImportError:
    print('Could not import tabletop_weather_station_demo. Please make sure that the demo is installed properly. ' + \
          'If you want to start the demo from source, you should direclty call "python main.py".')

    sys.exit(1)
