py_ext/py_ext.py
changeset 1746 45d6f5fba016
parent 1740 b789b695b5c6
child 1853 47a3f39bead0
equal deleted inserted replaced
1745:f9d32913bad4 1746:45d6f5fba016
    46                 python_eval_fb_list.append(v)
    46                 python_eval_fb_list.append(v)
    47         python_eval_fb_count = max(1, len(python_eval_fb_list))
    47         python_eval_fb_count = max(1, len(python_eval_fb_list))
    48 
    48 
    49         # prepare python code
    49         # prepare python code
    50         plc_python_code = plc_python_code % {
    50         plc_python_code = plc_python_code % {
    51             "python_eval_fb_count": python_eval_fb_count }
    51             "python_eval_fb_count": python_eval_fb_count}
    52 
    52 
    53         Gen_Pythonfile_path = os.path.join(buildpath, "py_ext.c")
    53         Gen_Pythonfile_path = os.path.join(buildpath, "py_ext.c")
    54         pythonfile = open(Gen_Pythonfile_path, 'w')
    54         pythonfile = open(Gen_Pythonfile_path, 'w')
    55         pythonfile.write(plc_python_code)
    55         pythonfile.write(plc_python_code)
    56         pythonfile.close()
    56         pythonfile.close()