runtime/__init__.py
changeset 2584 adfdeaba5a6a
parent 2583 e172ab28d04e
child 2586 b89484560a97
equal deleted inserted replaced
2579:8fb5c6eddc72 2584:adfdeaba5a6a
    28 
    28 
    29 def CreatePLCObjectSingleton(*args, **kwargs):
    29 def CreatePLCObjectSingleton(*args, **kwargs):
    30     global _PLCObjectSingleton
    30     global _PLCObjectSingleton
    31     from runtime.PLCObject import PLCObject  # noqa # pylint: disable=wrong-import-position
    31     from runtime.PLCObject import PLCObject  # noqa # pylint: disable=wrong-import-position
    32     _PLCObjectSingleton = PLCObject(*args, **kwargs)
    32     _PLCObjectSingleton = PLCObject(*args, **kwargs)
       
    33 
       
    34 
       
    35 def default_evaluator(tocall, *args, **kwargs):
       
    36     try:
       
    37         res = (tocall(*args, **kwargs), None)
       
    38     except Exception:
       
    39         res = (None, sys.exc_info())
       
    40     return res
       
    41 
       
    42