de sys.modules pour pouvoir importer successivement des catalogues de versions differentes
rep_macro=os.path.join(rep_macro,'Macro')
sys.path.insert(0,rep_macro)
+if sys.modules.has_key("SD"):
+ del sys.modules["SD"]
+for k in sys.modules.keys():
+ if k[0:3] == "SD.":
+ del sys.modules[k]
+
+
from cata import *
from math import ceil
from Extensions import param2
rep_sd=os.path.join(rep_sd,'SD')
sys.path.insert(0,rep_sd)
+if sys.modules.has_key("SD"):
+ del sys.modules["SD"]
+for k in sys.modules.keys():
+ if k[0:3] == "SD.":
+ del sys.modules[k]
+
+
from cata import *
from math import ceil
from Extensions import param2
nom_cata = os.path.splitext(os.path.basename(cata))[0]
rep_cata = os.path.dirname(cata)
sys.path[:0] = [rep_cata]
+
+ if sys.modules.has_key(nom_cata):
+ del sys.modules[nom_cata]
+ for k in sys.modules.keys():
+ if k[0:len(nom_cata)+1] == nom_cata+'.':
+ del sys.modules[k]
+
try :
o=__import__(nom_cata)
return o