Implements F and t in python. Fixes input from stdin in both sh and py.