equal
deleted
inserted
replaced
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" |