Re: [Modeling-users] pymodel implementation [was: install tests on 0.9pre11]
Status: Abandoned
Brought to you by:
sbigaret
|
From: Mario R. <ma...@ru...> - 2003-07-31 15:31:43
|
On Jeudi, juil 31, 2003, at 13:21 Europe/Zurich, Mario Ruggier wrote:
>>> % python test_AdaptorLayer.py
>>> Traceback (most recent call last):
>>> File "test_AdaptorLayer.py", line 36, in ?
>>> from utils import parseConfigFile_and_updateModel
>>> ImportError: cannot import name parseConfigFile_and_updateModel
>>> %
>>
>> I forgot that one, sorry, so it was not updated when this function was
>> transferred to Model.updateModelWithCFG(). You'll find enclosed a
>> patch
>> correcting this, I'll update it on cvs. Thanks for reporting.
>
> Applied the patch, and works OK.
Just looking into the PyModel implementation, and get the following:
% mdl_validate_model.py pymodel_StoreEmployees.py
Serious: couldn't load the model
exceptions.IndentationError
expected an indented block (line 231)
File "/usr/bin/mdl_validate_model.py", line 118, in main
from Modeling import Model
This from a CVS installation today, with the only difference being
the patch applied above (and with all the tests in test/README
passing OK, except for teh one noted exception earlier).
Other quick questions:
- in the example pymodel_StoreEmployees.py, what is the
component being returned (as in pymodel().component) ?
- Why did you opt for requiring a model.build() at the end of a pymodel?
Could this not have been handled automatically from within Model?
mario
|