runtime/__init__.py
changeset 209 08dc3d064cb5
parent 203 cb9901076a21
child 344 25b7b7f854bc
equal deleted inserted replaced
208:dd630979f628 209:08dc3d064cb5
     1 # module which import C files as strings
     1 # module which import C files as strings
     2 
     2 
     3 import os
     3 import os
     4 
     4 
     5 def code(name):
       
     6     filename = os.path.join(os.path.split(__file__)[0],name + ".c")
       
     7     if os.path.exists(filename):
       
     8         return open(filename).read()
       
     9     else:
       
    10         return "#error %s target not implemented !!!\n"%name
       
    11 
       
    12 from PLCObject import PLCObject
     5 from PLCObject import PLCObject
    13 import ServicePublisher
     6 import ServicePublisher