I'm currently doing a population model and the menu has options to set the generation values and settings, display those, run the model, export the model and quit. Is there a way to only run the section of the menu to 'display' for instance if the variables have been set? If you try to display the variables before they have been set, python just produces an error. I tried to do
if Display(Gen0) == True:
and also
if Gen0 == True:
but neither worked. I have used classes for my variables, and then inherited them for each menu item. Does anyone know a code that can check whether a class' variables have been set? I have tried looking on StackOverFlow and trying it myself, but neither was successful.
Aucun commentaire:
Enregistrer un commentaire