py_ext/py_ext.py
changeset 1736 7e61baa047f0
parent 1730 64d8f52bc8c8
child 1740 b789b695b5c6
equal deleted inserted replaced
1735:c02818d7e29f 1736:7e61baa047f0
    26 import os
    26 import os
    27 from POULibrary import POULibrary
    27 from POULibrary import POULibrary
    28 from PythonFileCTNMixin import PythonFileCTNMixin
    28 from PythonFileCTNMixin import PythonFileCTNMixin
    29 import util.paths as paths
    29 import util.paths as paths
    30 
    30 
       
    31 
    31 class PythonLibrary(POULibrary):
    32 class PythonLibrary(POULibrary):
    32     def GetLibraryPath(self):
    33     def GetLibraryPath(self):
    33         return paths.AbsNeighbourFile(__file__, "pous.xml")
    34         return paths.AbsNeighbourFile(__file__, "pous.xml")
    34 
    35 
    35     def Generate_C(self, buildpath, varlist, IECCFLAGS):
    36     def Generate_C(self, buildpath, varlist, IECCFLAGS):
    54         pythonfile.write(plc_python_code)
    55         pythonfile.write(plc_python_code)
    55         pythonfile.close()
    56         pythonfile.close()
    56 
    57 
    57         return (["py_ext"], [(Gen_Pythonfile_path, IECCFLAGS)], True), ""
    58         return (["py_ext"], [(Gen_Pythonfile_path, IECCFLAGS)], True), ""
    58 
    59 
       
    60 
    59 class PythonFile(PythonFileCTNMixin):
    61 class PythonFile(PythonFileCTNMixin):
    60 
    62 
    61     def GetIconName(self):
    63     def GetIconName(self):
    62         return "Pyfile"
    64         return "Pyfile"