Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Dammit, I should have searched in the python resources! I found a hint here:

Need to change the definition in globals(). The solution to the above problem is then:

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)