def get_dimensions_from_user(self, no_dim):
        """Queries grid dimensions in a model dialog and returns n-tuple

        Parameters
        ----------
        no_dim: Integer
        \t Number of grid dimensions, currently must be 3

        """

        # Grid dimension dialog

        if no_dim != 3:
            raise NotImplementedError(
                _("Currently, only 3D grids are supported."))

        dim_dialog = DimensionsEntryDialog(self.main_window)

        if dim_dialog.ShowModal() != wx.ID_OK:
            dim_dialog.Destroy()
            return

        dim = tuple(dim_dialog.dimensions)
        dim_dialog.Destroy()

        return dim
def get_dimensions_from_user ( self , no_dim ) : if no_dim != 3 : raise NotImplementedError ( _ ( "Currently, only 3D grids are supported." ) ) dim_dialog = DimensionsEntryDialog ( self . main_window ) if dim_dialog . ShowModal ( ) != wx . ID_OK : dim_dialog . Destroy ( ) return dim = tuple ( dim_dialog . dimensions ) dim_dialog . Destroy ( ) return dim
Queries grid dimensions in a model dialog and returns n-tuple

        Parameters
        ----------
        no_dim: Integer
        \t Number of grid dimensions, currently must be 3