# Path: py_arduino/main_utils.py
# class BaseMain(object):
#     def __init__(self):
#     def add_options(self):
#     def run(self, options, args, arduino):
#     def get_device(self, options, args):
#     def validate(self, options, args):
#     def start(self):


import os
import sys
from py_arduino.main_utils import default_main
##    py-arduino 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 version 2 for more details.
##
##    You should have received a copy of the GNU General Public License
##    along with py-arduino; see the file LICENSE.txt.
##-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-


# Setup PYTHONPATH
SRC_DIR = os.path.split(os.path.realpath(__file__))[0]  # SRC_DIR=EXAMPLE_DIR
SRC_DIR = os.path.split(SRC_DIR)[0]  # SRC_DIR=SRC_DIR/../
SRC_DIR = os.path.join(SRC_DIR, 'src')  # SRC_DIR
sys.path.append(os.path.abspath(SRC_DIR))



def args_validator(parser, options, args):  # pylint: disable=W0613
    if len(args) != 2:
        parser.error("must specified two argument: serial device and digital port")


def add_options_callback(parser):
    parser.add_option("--loop",
        action="store_true", dest="loop", default=False,
        help="Keep reading and printing the values.")


def main():

# Path: py_arduino/main_utils.py
# class BaseMain(object):
#     def __init__(self):
#     def add_options(self):
#     def run(self, options, args, arduino):
#     def get_device(self, options, args):
#     def validate(self, options, args):
#     def start(self):


# Path: examples/other/dht11.py
import os
import sys
from py_arduino.main_utils import default_main

##    py-arduino 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 version 2 for more details.
##
##    You should have received a copy of the GNU General Public License
##    along with py-arduino; see the file LICENSE.txt.
##-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-


# Setup PYTHONPATH
SRC_DIR = os.path.split(os.path.realpath(__file__))[0]  # SRC_DIR=EXAMPLE_DIR
SRC_DIR = os.path.split(SRC_DIR)[0]  # SRC_DIR=SRC_DIR/../
SRC_DIR = os.path.join(SRC_DIR, 'src')  # SRC_DIR
sys.path.append(os.path.abspath(SRC_DIR))



def args_validator(parser, options, args):  # pylint: disable=W0613
    if len(args) != 2:
        parser.error("must specified two argument: serial device and digital port")


def add_options_callback(parser):
    parser.add_option("--loop",
        action="store_true", dest="loop", default=False,
        help="Keep reading and printing the values.")


def main():

    options, args, arduino = default_main(