summaryrefslogtreecommitdiff
path: root/modules/input_handlers/stdin_input.py
diff options
context:
space:
mode:
authorBotond Hende <nettingman@gmail.com>2024-11-20 11:55:10 +0100
committerBotond Hende <nettingman@gmail.com>2024-11-20 11:55:10 +0100
commit528d65c6bd9954cfd96de57de05498dc4c563e0f (patch)
treec1f8f92f6c0311170e71aead67e6e3531458be2c /modules/input_handlers/stdin_input.py
parent6f3acbf0bec6bf012c5f52aee2f18059918104d9 (diff)
moved input to another package
Diffstat (limited to 'modules/input_handlers/stdin_input.py')
-rw-r--r--modules/input_handlers/stdin_input.py9
1 files changed, 9 insertions, 0 deletions
diff --git a/modules/input_handlers/stdin_input.py b/modules/input_handlers/stdin_input.py
new file mode 100644
index 0000000..044ac0d
--- /dev/null
+++ b/modules/input_handlers/stdin_input.py
@@ -0,0 +1,9 @@
+import sys
+
+def get_input_stdin():
+ for line in sys.stdin:
+ line = line.strip()
+ if not line:
+ continue
+
+ yield line \ No newline at end of file