svgui/svgui.py
changeset 2442 b13f021c68a5
parent 1853 47a3f39bead0
child 2620 063391cd313d
--- a/svgui/svgui.py	Tue Oct 09 13:50:29 2018 +0300
+++ b/svgui/svgui.py	Tue Oct 09 14:03:44 2018 +0300
@@ -93,7 +93,7 @@
 
         svgfile = self._getSVGpath()
         if os.path.exists(svgfile):
-            res += (("gui.svg", file(svgfile, "rb")),)
+            res += (("gui.svg", open(svgfile, "rb")),)
 
         svguiserverfile = open(self._getSVGUIserverpath(), 'r')
         svguiservercode = svguiserverfile.read()
@@ -111,7 +111,7 @@
         svguilibfile.write(open(os.path.join(fpath, "livesvg.js"), 'r').read())
         svguilibfile.close()
         jsmodules = {"LiveSVGPage": "svguilib.js"}
-        res += (("svguilib.js", file(svguilibpath, "rb")),)
+        res += (("svguilib.js", open(svguilibpath, "rb")),)
 
         runtimefile_path = os.path.join(buildpath, "runtime_%s.py" % location_str)
         runtimefile = open(runtimefile_path, 'w')
@@ -128,7 +128,7 @@
                "jsmodules": str(jsmodules)})
         runtimefile.close()
 
-        res += (("runtime_%s.py" % location_str, file(runtimefile_path, "rb")),)
+        res += (("runtime_%s.py" % location_str, open(runtimefile_path, "rb")),)
 
         return res