A very simple but powerful shell script which enables writing ad-hoc Python scripts for processing line-oriented input. It executes the following code template:

$INIT for line in sys.stdin: $LOOP $END

where $INIT, $LOOP and $END code blocks are given from command line. If only one argument is given, then $INIT and $END are empty. If two arguments are given, $END is empty.

Examples (script is saved as 'pyk' in the $PATH):