I\'m fairly new to python coming from C/C++, I was wondering how I would get my \'main.py\' to reconize/use the imput given from a bash shell as:
pyth
Read from sys.stdin:
sys.stdin
import sys sys.stdin.read()
Being a file-like object, you can use its reading functions or simply iterate over the input lines:
for line in sys.stdin: print line