## Make a python script pipable

Python is a very nice language for scripting, it is only natural that it can be used as a pipe receiver. Here is the simplest example:

#!/usr/bin/env python3

# file: /tmp/echo.py
import sys

fromstdin = sys.stdin.read()
print(fromstdin)



Make it executable, then try this in shell:

echo "hi, there" | /tmp/echo.py