runtime/__init__.py
changeset 2583 e172ab28d04e
parent 2327 569d7fbc0bd4
child 2586 b89484560a97
equal deleted inserted replaced
2582:8f0d6c5fd55f 2583:e172ab28d04e
    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