web/propertysheet.py
changeset 10615 6c497fe389d2
parent 10614 57dfde80df11
child 10662 10942ed172de
--- a/web/propertysheet.py	Tue Sep 15 15:33:47 2015 +0200
+++ b/web/propertysheet.py	Fri Sep 18 18:26:07 2015 +0200
@@ -57,7 +57,9 @@
     def load(self, fpath):
         scriptglobals = self.context.copy()
         scriptglobals['__file__'] = fpath
-        execfile(fpath, scriptglobals, self)
+        with open(fpath, 'rb') as fobj:
+            code = compile(fobj.read(), fpath, 'exec')
+        exec(code, scriptglobals, self)
         for name, type in TYPE_CHECKS:
             if name in self:
                 if not isinstance(self[name], type):