summaryrefslogtreecommitdiff
path: root/modules/input_handlers/stdin_input.py
diff options
context:
space:
mode:
authorBotond Hende <nettingman@gmail.com>2024-11-24 23:53:13 +0100
committerBotond Hende <nettingman@gmail.com>2024-11-24 23:53:13 +0100
commit965c0e3401a4743c4f5e91e2368fd04b0b24aa02 (patch)
treed9428a6f15a6b480d079f53bbc802efca13eafca /modules/input_handlers/stdin_input.py
parenta54f9cbed78ce3df4252c209553f4f318bc2b81e (diff)
input_handler can be specified from config
Diffstat (limited to 'modules/input_handlers/stdin_input.py')
-rw-r--r--modules/input_handlers/stdin_input.py19
1 files changed, 13 insertions, 6 deletions
diff --git a/modules/input_handlers/stdin_input.py b/modules/input_handlers/stdin_input.py
index 044ac0d..5c50511 100644
--- a/modules/input_handlers/stdin_input.py
+++ b/modules/input_handlers/stdin_input.py
@@ -1,9 +1,16 @@
import sys
-def get_input_stdin():
- for line in sys.stdin:
- line = line.strip()
- if not line:
- continue
+from modules.input_handlers.input_handler import InputHandler
- yield line \ No newline at end of file
+
+class StdinInput(InputHandler):
+ def cleanup(self):
+ pass
+
+ def get_input(self):
+ for line in sys.stdin:
+ line = line.strip()
+ if not line:
+ continue
+
+ yield line \ No newline at end of file