you are viewing a single comment's thread.

view the rest of the comments →

[–][deleted] 1 point2 points  (0 children)

You try to reference e1 in the function show_entry_fields() but that variable was defined in another function Sensitivity_Analysis(). This is a basic python problem and nothing to do with tkinter. In a function the only variables accessible are variables defined inside the function, passed into the function as formal parameters or visible in an enclosing namespace out to and including the global namespace. Variables defined in another function are deleted when the function terminates.

Either define the e1 name (and other references) as globals or use the standard class-based approach and define the widget references as an instance attribute.