MCPcopy Create free account
hub / github.com/NGSolve/ngsolve / __setattr__

Method __setattr__

python/internal.py:21–26  ·  view source on GitHub ↗
(self, attribute_name, value)

Source from the content-addressed store, hash-verified

19
20 # set corresponding variable in tcl and call update_cmd
21 def __setattr__(self, attribute_name, value):
22 if not attribute_name in self._attributes:
23 raise KeyError()
24 tcl_string = 'set '+self._name+'.'+attribute_name+' '+str(value)+'; '+self._update_cmd+';\n'
25 ngsolve.solve.Tcl_Eval(tcl_string)
26 ngsolve.Redraw()
27
28 # return list of possible attributes - for autocompletion
29 def __dir__(self):

Callers 1

__init__Method · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected