ProjectController.py
changeset 2442 b13f021c68a5
parent 2441 c553769a65af
child 2449 b0560adec4b7
--- a/ProjectController.py	Tue Oct 09 13:50:29 2018 +0300
+++ b/ProjectController.py	Tue Oct 09 14:03:44 2018 +0300
@@ -859,9 +859,9 @@
         H_files = map(
             lambda filename: os.path.join(buildpath, filename), H_files)
         for H_file in H_files:
-            with file(H_file, 'r') as original:
+            with open(H_file, 'r') as original:
                 data = original.read()
-            with file(H_file, 'w') as modified:
+            with open(H_file, 'w') as modified:
                 modified.write('#include "beremiz.h"\n' + data)
 
         self.logger.write(_("Extracting Located Variables...\n"))
@@ -1289,7 +1289,7 @@
                 self._IECCodeView.SetTextSyntax("ALL")
                 self._IECCodeView.SetKeywords(IEC_KEYWORDS)
                 try:
-                    text = file(plc_file).read()
+                    text = open(plc_file).read()
                 except Exception:
                     text = '(* No IEC code have been generated at that time ! *)'
                 self._IECCodeView.SetText(text=text)