I developed a configuration mechanism in Python, where certain objects can work in special ways to identify problems in our domain.
The user poses a problem using these objects in the form of a "config-file". For instance:
CASES = [
('Case 1', Item('item1') + Item('item2') + Item('item3')),
('Case 2', Item('item1') + Item('item4')),
]
DATA = {
'Case 1' = {'Piece 1': 'path 1'},
'Case 2' = {'Piece 1': 'path 2'},
}
Objects Item, of course, are defined in a specific module. To use them, you must issue an instruction import: from models import Item(of course, my actual import is more complex, not just one).
I would like the user to simply write the presented configuration without the need for import (users can very easily forget this).
, , .
?
Edit:
Django, "" python script, -. , Python " ( Item - ), script - , ".