123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106 |
- #!/usr/bin/env python3.5
- # Copyright 2017 Digital
- #
- # This file is part of BeeWatch.
- #
- # BeeWatch 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 3 of the License, or
- # (at your option) any later version.
- #
- # BeeWatch 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 BeeWatch. If not, see <http://www.gnu.org/licenses/>.
- ## Imports
- # Python imports
- import logging
- import logging.handlers
- import sys
- import time
- import traceback
- # Third party imports
- import blinker
- import curio
- import digilib.network
- # import beewatch.server
- log = logging.getLogger(__name__+"")
- log = logging.getLogger(__name__+".psm")
- # class PinScriptManager(object):
- # scripts = []
- # signals = [
- # ]
- # handlers = {
- # }
- # def __init__(self):
- # super(PinScriptManager,self).__init__()
- # def load_script(self,script):
- # if script in self.scripts:
- # lpsm.warn("script '{}' is already loaded!")
- # self.scripts.add(script)
- # script.on_load()
- # # def import_script(self,script)
- # def unload_script(self,script):
- # if script in self.scripts:
- # raise ValueError("script '{}' is not loaded")
- # script.on_unload()
- # self.scripts.remove(script)
- # def connect(self,signal,func):
- # if not signal in self.signals:
- # raise ValueError("There is no signal named '{}'".format(signal))
- # self.handlers[signal].append(func)
- # def disconnect(self,signal,func):
- # if not signal in self.signals:
- # raise NameError("There is no signal named '{}'".format(signal))
- # self.handlers[signal].append(func)
- # class PinScript(object):
- # """docstring for Script."""
- # def __init__(self):
- # super(PinScript, self).__init__()
- # def on_load(self):
- # pass
- # def on_unload(self):
- # pass
- #
- # class TestPS(PinScript):
- # def __init__(self):
- #
- # if __name__ == "__main__":
- # psm = PinScriptManager()
- #
- #
|