def show_dlg(self, dlg):
        """
        Abstraction function that is to be used instead of dlg.ShowModal

        Parameters
        ----------
        dlg : dialog to ShowModal if possible
        """
        if not self.test_mode:
            dlg.Center()
            return dlg.ShowModal()
        else:
            return dlg.GetAffirmativeId()
def show_dlg ( self , dlg ) : if not self . test_mode : dlg . Center ( ) return dlg . ShowModal ( ) else : return dlg . GetAffirmativeId ( )
Abstraction function that is to be used instead of dlg.ShowModal

        Parameters
        ----------
        dlg : dialog to ShowModal if possible