1 | initial version |
Dammit, I should have searched in the python resources! I found a hint here: http://stackoverflow.com/questions/4687364/assigning-values-to-variables-in-a-list-using-a-loop
Need to change the definition in globals(). The solution to the above problem is then:
load_session('ws1')
load_session('ws2')
ndict = {}
ndict[P_va] = P_wa
list_names = show_identifiers()
list_eqs = [i for i in list_names if i[0:3] == 'eq_']
for eq in list_eqs:
globals()[eq] = eval(eq).subs(ndict)