[Modeling-cvs] ProjectModeling/Modeling/ModelMasons/Python_bricks init.tmpl,1.4,1.5
Status: Abandoned
Brought to you by:
sbigaret
From: <sbi...@us...> - 2003-04-25 18:39:18
|
Update of /cvsroot/modeling/ProjectModeling/Modeling/ModelMasons/Python_bricks In directory sc8-pr-cvs1:/tmp/cvs-serv17242/ModelMasons/Python_bricks Modified Files: init.tmpl Log Message: Corrected: sorry, I took some code from branch 0_9pre6_ModelMasons_base_generation_scheme + fixed some silly bugs Index: init.tmpl =================================================================== RCS file: /cvsroot/modeling/ProjectModeling/Modeling/ModelMasons/Python_bricks/init.tmpl,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** init.tmpl 25 Apr 2003 18:13:35 -0000 1.4 --- init.tmpl 25 Apr 2003 18:39:13 -0000 1.5 *************** *** 11,15 **** script mdl_compile_model.py ! Simply returns if a model named '$model_name' has already been loaded """ from Modeling import ModelSet --- 11,15 ---- script mdl_compile_model.py ! Simply returns if a model named "$model_name" has already been loaded """ from Modeling import ModelSet *************** *** 18,26 **** return try: - #if $base_dir: - from $(base_dir).model_$(model_name)_pickle import model_pickle - #else from model_$(model_name)_pickle import model_pickle - #end if import cPickle m=cPickle.loads(model_pickle) --- 18,22 ---- *************** *** 37,49 **** try: - #if $base_dir: - from $(base_dir).model_$(model_name) import model_src - #else from model_$(model_name) import model_src - #end if ModelSet.defaultModelSet().addModelFromXML({'string': model_src}) model=ModelSet.defaultModelSet().modelNamed("$(model_name)") except: ! exc=StringIO.StringIO() traceback.print_exc(file=exc) warnings.warn("Couldn't load model 'model_$(model_name).xml'\nReason:\n%s"%exc.getvalue()) --- 33,41 ---- try: from model_$(model_name) import model_src ModelSet.defaultModelSet().addModelFromXML({'string': model_src}) model=ModelSet.defaultModelSet().modelNamed("$(model_name)") except: ! exc=cStringIO.StringIO() traceback.print_exc(file=exc) warnings.warn("Couldn't load model 'model_$(model_name).xml'\nReason:\n%s"%exc.getvalue()) |