summaryrefslogtreecommitdiff
path: root/modules/input_handlers/stdin_input.py
blob: a18273f91c197bde13675793a07845506f3a8b63 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
import sys

from modules.input_handlers.input_handler import InputHandler


class StdinInput(InputHandler):
    def cleanup(self) -> None:
        pass

    def get_input(self) -> str:
        for line in sys.stdin:
            line = line.strip()
            if not line:
                continue

            yield line