lpcmanager

Added buzzer block.

2017-05-17, dgaberscek
12b31893a57f
Added buzzer block.
# Project name: SmartehIDE
# __init__.py.py: spacer widget module initialization
# 19. 01. 2017 12:24 Uporabnik
#
# Copyright (c) 2017 Smarteh d.o.o. <info@smarteh.si>
# THIS PROGRAM COMES WITH NO WARRANTY
import Pyro.core
from connectors.PYRO import PYRO_connector_factory
oldPYRO_connector_factory = PYRO_connector_factory
def MW_PYRO_connector_factory(uri, confnodesroot):
servicetype, location = uri.split("://")
if servicetype == "PYROS":
schemename = "PYROLOCSSL"
else:
schemename = "PYROLOC"
def CustomFunctionCall(self, funcname, args=None):
member = self.__dict__.get(funcname, None)
if member is None:
def my_local_func(*args, **kwargs):
funcnameCall = funcname.split('.')[-1]
return RemoteMWControllerProxy.__getattr__(funcnameCall)(*args, **kwargs)
member = PyroCatcher(my_local_func, None)
self.__dict__[funcname] = member
return member
RemoteMWControllerProxy = Pyro.core.getAttrProxyForURI(schemename + "://" + location + "/MWController")
pyro_connector = oldPYRO_connector_factory(uri, confnodesroot)
pyro_connector.RemoteMWControllerProxy = RemoteMWControllerProxy
pyro_connector.CustomFunctionCall = CustomFunctionCall
return pyro_connector
PYRO_connector_factory = MW_PYRO_connector_factory