from .server import Server from pygame import event from pygame.locals import QUIT class StopException(RuntimeError): pass class InputServer(Server): def __init__(self): super().__init__() def step(self): for e in event.get(): if e.type == QUIT: raise StopException