summaryrefslogtreecommitdiff
path: root/modules/input_handlers
diff options
context:
space:
mode:
Diffstat (limited to 'modules/input_handlers')
-rw-r--r--modules/input_handlers/__init__.py0
-rw-r--r--modules/input_handlers/stdin_input.py9
2 files changed, 9 insertions, 0 deletions
diff --git a/modules/input_handlers/__init__.py b/modules/input_handlers/__init__.py
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/modules/input_handlers/__init__.py
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