--- a/py_ext/py_ext.py Fri Aug 11 15:18:19 2017 +0300
+++ b/py_ext/py_ext.py Mon Aug 14 19:13:01 2017 +0300
@@ -30,10 +30,10 @@
class PythonLibrary(POULibrary):
def GetLibraryPath(self):
- return paths.AbsNeighbourFile(__file__, "pous.xml")
+ return paths.AbsNeighbourFile(__file__, "pous.xml")
def Generate_C(self, buildpath, varlist, IECCFLAGS):
-
+
plc_python_filepath = paths.AbsNeighbourFile(__file__, "plc_python.c")
plc_python_file = open(plc_python_filepath, 'r')
plc_python_code = plc_python_file.read()
@@ -44,21 +44,19 @@
"PYTHON_POLL"]:
python_eval_fb_list.append(v)
python_eval_fb_count = max(1, len(python_eval_fb_list))
-
+
# prepare python code
plc_python_code = plc_python_code % {
"python_eval_fb_count": python_eval_fb_count }
-
+
Gen_Pythonfile_path = os.path.join(buildpath, "py_ext.c")
pythonfile = open(Gen_Pythonfile_path,'w')
pythonfile.write(plc_python_code)
pythonfile.close()
-
+
return (["py_ext"], [(Gen_Pythonfile_path, IECCFLAGS)], True), ""
class PythonFile(PythonFileCTNMixin):
-
+
def GetIconName(self):
return "Pyfile"
-
-