Salome HOME
A way to deal with environment modules.
[tools/yacsgen.git] / Examples / pydoc1 / components.py
index 72e88d6b67a9e650cf694db9fb52b4dc0b0660b2..3013f5344181f77ecac4ff1a694b34638c1a24a7 100644 (file)
@@ -1,4 +1,4 @@
-# Copyright (C) 2009-2014  EDF R&D
+# Copyright (C) 2009-2021  EDF R&D
 #
 # This library is free software; you can redistribute it and/or
 # modify it under the terms of the GNU Lesser General Public
@@ -20,7 +20,7 @@
 import os
 
 #import context from ..
-execfile("../context.py")
+exec(compile(open("../context.py").read(), "../context.py", 'exec'))
 
 from module_generator import *
 
@@ -49,6 +49,7 @@ g.generate()
 g.configure()
 g.make()
 g.install()
-g.make_appli("appli", restrict=["KERNEL"], altmodules={"GUI":GUI_ROOT_DIR, "YACS":YACS_ROOT_DIR})
+g.make_appli("appli", restrict=["KERNEL"], altmodules={"GUI":GUI_ROOT_DIR,
+                                "YACS":YACS_ROOT_DIR}, sys_modules=SYS_MODULES)