requires_state#
- biotite.application.requires_state(app_state)[source]#
A decorator for methods of
Applicationsubclasses that raises anAppStateErrorin case the method is called, when theApplicationis not in the specifiedAppStateapp_state.- Parameters:
- app_stateAppState
The required app state.
Examples
Raises
AppStateErrorwhen function is called, ifApplicationis not in one of the specified states:>>> @requires_state(AppState.RUNNING | AppState.FINISHED) ... def function(self): ... pass